Skip to content

Commit 03c54f6

Browse files
release: 1.30.0 (#663)
* chore(docs): grammar improvements * feat(api): api update * feat(api): api update * codegen metadata * codegen metadata * codegen metadata * codegen metadata * chore(tests): skip endpoints with basic auth * chore(docs): remove reference to rye shell * feat(client): add follow_redirects request option * fix(client): fix PayStatementResponse body * fix(client): manual fix * feat(api): api update * feat(api): api update * chore(tests): run tests in parallel * fix(client): correctly parse binary response | stream * chore(tests): add tests for httpx client instantiation & proxies * chore(internal): update conftest.py * chore(ci): enable for pull requests * chore(readme): update badges * docs(client): fix httpx.Timeout documentation reference * feat(client): add support for aiohttp * chore(tests): skip some failing tests on the latest python versions * fix(ci): release-doctor — report correct token name * chore(ci): only run for pushes and fork pull requests * fix(ci): correct conditional * chore(ci): change upload type * chore: fix access tokens test * release: 1.30.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Tomer Aberbach <tomer@stainless.com>
1 parent fc4299d commit 03c54f6

File tree

70 files changed

+801
-476
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+801
-476
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ on:
77
- 'integrated/**'
88
- 'stl-preview-head/**'
99
- 'stl-preview-base/**'
10+
pull_request:
11+
branches-ignore:
12+
- 'stl-preview-head/**'
13+
- 'stl-preview-base/**'
1014

1115
jobs:
1216
lint:
1317
timeout-minutes: 10
1418
name: lint
1519
runs-on: ${{ github.repository == 'stainless-sdks/finch-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
20+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
1621
steps:
1722
- uses: actions/checkout@v4
1823

@@ -30,17 +35,31 @@ jobs:
3035
- name: Run lints
3136
run: ./scripts/lint
3237

33-
upload:
34-
if: github.repository == 'stainless-sdks/finch-python'
38+
build:
39+
if: github.repository == 'stainless-sdks/finch-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
3540
timeout-minutes: 10
36-
name: upload
41+
name: build
3742
permissions:
3843
contents: read
3944
id-token: write
4045
runs-on: depot-ubuntu-24.04
4146
steps:
4247
- uses: actions/checkout@v4
4348

49+
- name: Install Rye
50+
run: |
51+
curl -sSf https://rye.astral.sh/get | bash
52+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
53+
env:
54+
RYE_VERSION: '0.44.0'
55+
RYE_INSTALL_OPTION: '--yes'
56+
57+
- name: Install dependencies
58+
run: rye sync --all-features
59+
60+
- name: Run build
61+
run: rye build
62+
4463
- name: Get GitHub OIDC Token
4564
id: github-oidc
4665
uses: actions/github-script@v6
@@ -58,6 +77,7 @@ jobs:
5877
timeout-minutes: 10
5978
name: test
6079
runs-on: ${{ github.repository == 'stainless-sdks/finch-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
80+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
6181
steps:
6282
- uses: actions/checkout@v4
6383

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.29.0"
2+
".": "1.30.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-944a0f9d35f3b8ec2ba62fa12e551cf89f0b845f8ed1e3c7f67a9fb80b32d96f.yml
3-
openapi_spec_hash: 37c849e7b5dd941c011385b49467e077
4-
config_hash: 53778a0b839c4f6ad34fbba051f5e8a6
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f7e741bc6e0175fd96a9db5348092b90a77b0985154c0814bb681ad5dccdf19a.yml
3+
openapi_spec_hash: b348a9ef407a8e91dd770fcb219d4ac5
4+
config_hash: 5146b12344dae76238940989dac1e8a0

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
11
# Changelog
22

3+
## 1.30.0 (2025-07-02)
4+
5+
Full Changelog: [v1.29.0...v1.30.0](https://github.com/Finch-API/finch-api-python/compare/v1.29.0...v1.30.0)
6+
7+
### Features
8+
9+
* **api:** api update ([97ef62d](https://github.com/Finch-API/finch-api-python/commit/97ef62d11c21650cb6f34a69f3309cdbf034df86))
10+
* **api:** api update ([68ed0de](https://github.com/Finch-API/finch-api-python/commit/68ed0de62a49c340a1ee7dc71d941d71b6d780c4))
11+
* **api:** api update ([a31325e](https://github.com/Finch-API/finch-api-python/commit/a31325e6eeb04cfa725ceee5637b869dd02be1a8))
12+
* **api:** api update ([b95ac19](https://github.com/Finch-API/finch-api-python/commit/b95ac1971a10372d70fc7ccdb3cf63f4411e9d2e))
13+
* **client:** add follow_redirects request option ([f9bdda7](https://github.com/Finch-API/finch-api-python/commit/f9bdda77ef1fcb1460594a16f1b8726bbaad2b52))
14+
* **client:** add support for aiohttp ([9529a96](https://github.com/Finch-API/finch-api-python/commit/9529a960260e47e147e10a9fec012f279089628b))
15+
16+
17+
### Bug Fixes
18+
19+
* **ci:** correct conditional ([5bd88a7](https://github.com/Finch-API/finch-api-python/commit/5bd88a7228b013e66794a9731e3d3669d1a43321))
20+
* **ci:** release-doctor — report correct token name ([d424f44](https://github.com/Finch-API/finch-api-python/commit/d424f44c05c5c05bf31b43e1da74acea40324553))
21+
* **client:** correctly parse binary response | stream ([260c761](https://github.com/Finch-API/finch-api-python/commit/260c761024d36f0bb4efc3cf5a5e0e3c22b5f83e))
22+
* **client:** fix PayStatementResponse body ([edcea6c](https://github.com/Finch-API/finch-api-python/commit/edcea6c7ac55661d3e46aec1c42576988b510dfc))
23+
* **client:** manual fix ([d1dc8a4](https://github.com/Finch-API/finch-api-python/commit/d1dc8a4aa3df7a0199ab04958a766b56b3be0dc5))
24+
25+
26+
### Chores
27+
28+
* **ci:** change upload type ([2d63eed](https://github.com/Finch-API/finch-api-python/commit/2d63eeda7540306cf29e14ac475c6f5cc740d768))
29+
* **ci:** enable for pull requests ([3a05f2a](https://github.com/Finch-API/finch-api-python/commit/3a05f2a17a2f0067486b6c8427b2d50c18a79a80))
30+
* **ci:** only run for pushes and fork pull requests ([398de61](https://github.com/Finch-API/finch-api-python/commit/398de612e40086b2814a79c2fcdd0d73bba289fc))
31+
* **docs:** grammar improvements ([2d4a30e](https://github.com/Finch-API/finch-api-python/commit/2d4a30edc2f84fc7effc9b7719aae8ed51646338))
32+
* **docs:** remove reference to rye shell ([2b6929f](https://github.com/Finch-API/finch-api-python/commit/2b6929f8eca16bff688b19907f38e05ad2d2b092))
33+
* fix access tokens test ([8411cf6](https://github.com/Finch-API/finch-api-python/commit/8411cf6e5185b4f2dd70ac030d30d7c9808e55b5))
34+
* **internal:** update conftest.py ([ed2f82d](https://github.com/Finch-API/finch-api-python/commit/ed2f82d6ecc8662e4717c9f7b75d912226c5df25))
35+
* **readme:** update badges ([e27f6d8](https://github.com/Finch-API/finch-api-python/commit/e27f6d80e9b9bdbb23fa3a6c9cc84ecbbf790638))
36+
* **tests:** add tests for httpx client instantiation & proxies ([e51c8f7](https://github.com/Finch-API/finch-api-python/commit/e51c8f78bb45e0c3dbce5dc67401390078a2fd33))
37+
* **tests:** run tests in parallel ([25017c4](https://github.com/Finch-API/finch-api-python/commit/25017c43233e726dd80d1e7ca41eb02ec9456871))
38+
* **tests:** skip endpoints with basic auth ([9548dd5](https://github.com/Finch-API/finch-api-python/commit/9548dd59525baf33a8d1977b132e93b2fe1d7f96))
39+
* **tests:** skip some failing tests on the latest python versions ([668de92](https://github.com/Finch-API/finch-api-python/commit/668de928c9cd69af00755b2a201f3e26a24f9630))
40+
41+
42+
### Documentation
43+
44+
* **client:** fix httpx.Timeout documentation reference ([c17f081](https://github.com/Finch-API/finch-api-python/commit/c17f0817149ae17fe866bc79f8613cbccc0ded72))
45+
346
## 1.29.0 (2025-05-16)
447

548
Full Changelog: [v1.28.0...v1.29.0](https://github.com/Finch-API/finch-api-python/compare/v1.28.0...v1.29.0)

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ $ rye sync --all-features
1717
You can then run scripts using `rye run python script.py` or by activating the virtual environment:
1818

1919
```sh
20-
$ rye shell
21-
# or manually activate - https://docs.python.org/3/library/venv.html#how-venvs-work
20+
# Activate the virtual environment - https://docs.python.org/3/library/venv.html#how-venvs-work
2221
$ source .venv/bin/activate
2322

2423
# now you can omit the `rye run` prefix

README.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Finch Python API library
22

3-
[![PyPI version](https://img.shields.io/pypi/v/finch-api.svg)](https://pypi.org/project/finch-api/)
3+
[![PyPI version](<https://img.shields.io/pypi/v/finch-api.svg?label=pypi%20(stable)>)](https://pypi.org/project/finch-api/)
44

55
The Finch Python library provides convenient access to the Finch REST API from any Python 3.8+
66
application. The library includes type definitions for all request params and response fields,
@@ -57,6 +57,37 @@ asyncio.run(main())
5757

5858
Functionality between the synchronous and asynchronous clients is otherwise identical.
5959

60+
### With aiohttp
61+
62+
By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
63+
64+
You can enable this by installing `aiohttp`:
65+
66+
```sh
67+
# install from PyPI
68+
pip install finch-api[aiohttp]
69+
```
70+
71+
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
72+
73+
```python
74+
import asyncio
75+
from finch import DefaultAioHttpClient
76+
from finch import AsyncFinch
77+
78+
79+
async def main() -> None:
80+
async with AsyncFinch(
81+
access_token="My Access Token",
82+
http_client=DefaultAioHttpClient(),
83+
) as client:
84+
page = await client.hris.directory.list()
85+
print(page.individuals)
86+
87+
88+
asyncio.run(main())
89+
```
90+
6091
## Using types
6192

6293
Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
@@ -219,7 +250,7 @@ client.with_options(max_retries=5).hris.directory.list()
219250
### Timeouts
220251

221252
By default requests time out after 1 minute. You can configure this with a `timeout` option,
222-
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
253+
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
223254

224255
```python
225256
from finch import Finch

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by Finch please follow the respective company's security reporting guidelines.
19+
or products provided by Finch, please follow the respective company's security reporting guidelines.
2020

2121
### Finch Terms and Policies
2222

23-
Please contact founders@tryfinch.com for any questions or concerns regarding security of our services.
23+
Please contact founders@tryfinch.com for any questions or concerns regarding the security of our services.
2424

2525
---
2626

api.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,12 @@ Methods:
128128
Types:
129129

130130
```python
131-
from finch.types.hris import PayStatement, PayStatementResponse, PayStatementResponseBody
131+
from finch.types.hris import (
132+
PayStatement,
133+
PayStatementDataSyncInProgress,
134+
PayStatementResponse,
135+
PayStatementResponseBody,
136+
)
132137
```
133138

134139
Methods:
@@ -170,7 +175,6 @@ from finch.types.hris import (
170175
SupportPerBenefitType,
171176
SupportedBenefit,
172177
UpdateCompanyBenefitResponse,
173-
BenefitListSupportedBenefitsResponse,
174178
BenfitContribution,
175179
)
176180
```
@@ -181,7 +185,7 @@ Methods:
181185
- <code title="get /employer/benefits/{benefit_id}">client.hris.benefits.<a href="./src/finch/resources/hris/benefits/benefits.py">retrieve</a>(benefit_id) -> <a href="./src/finch/types/hris/company_benefit.py">CompanyBenefit</a></code>
182186
- <code title="post /employer/benefits/{benefit_id}">client.hris.benefits.<a href="./src/finch/resources/hris/benefits/benefits.py">update</a>(benefit_id, \*\*<a href="src/finch/types/hris/benefit_update_params.py">params</a>) -> <a href="./src/finch/types/hris/update_company_benefit_response.py">UpdateCompanyBenefitResponse</a></code>
183187
- <code title="get /employer/benefits">client.hris.benefits.<a href="./src/finch/resources/hris/benefits/benefits.py">list</a>() -> <a href="./src/finch/types/hris/company_benefit.py">SyncSinglePage[CompanyBenefit]</a></code>
184-
- <code title="get /employer/benefits/meta">client.hris.benefits.<a href="./src/finch/resources/hris/benefits/benefits.py">list_supported_benefits</a>() -> <a href="./src/finch/types/hris/benefit_list_supported_benefits_response.py">SyncSinglePage[BenefitListSupportedBenefitsResponse]</a></code>
188+
- <code title="get /employer/benefits/meta">client.hris.benefits.<a href="./src/finch/resources/hris/benefits/benefits.py">list_supported_benefits</a>() -> <a href="./src/finch/types/hris/supported_benefit.py">SyncSinglePage[SupportedBenefit]</a></code>
185189

186190
### Individuals
187191

bin/check-release-environment

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
errors=()
44

55
if [ -z "${PYPI_TOKEN}" ]; then
6-
errors+=("The FINCH_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
6+
errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
77
fi
88

99
lenErrors=${#errors[@]}

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "finch-api"
3-
version = "1.29.0"
3+
version = "1.30.0"
44
description = "The official Python library for the Finch API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -37,6 +37,8 @@ classifiers = [
3737
Homepage = "https://github.com/Finch-API/finch-api-python"
3838
Repository = "https://github.com/Finch-API/finch-api-python"
3939

40+
[project.optional-dependencies]
41+
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"]
4042

4143
[tool.rye]
4244
managed = true
@@ -54,6 +56,7 @@ dev-dependencies = [
5456
"importlib-metadata>=6.7.0",
5557
"rich>=13.7.1",
5658
"nest_asyncio==1.6.0",
59+
"pytest-xdist>=3.6.1",
5760
]
5861

5962
[tool.rye.scripts]
@@ -125,7 +128,7 @@ replacement = '[\1](https://github.com/Finch-API/finch-api-python/tree/main/\g<2
125128

126129
[tool.pytest.ini_options]
127130
testpaths = ["tests"]
128-
addopts = "--tb=short"
131+
addopts = "--tb=short -n auto"
129132
xfail_strict = true
130133
asyncio_mode = "auto"
131134
asyncio_default_fixture_loop_scope = "session"

0 commit comments

Comments
 (0)