Skip to content

Commit f255dcc

Browse files
authored
Merge pull request #64 from isaacus-dev/release-please--branches--main--changes--next
release: 0.8.0
2 parents c31e59e + 797af04 commit f255dcc

File tree

21 files changed

+462
-117
lines changed

21 files changed

+462
-117
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/isaacus-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/isaacus-python'
38+
build:
39+
if: github.repository == 'stainless-sdks/isaacus-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/isaacus-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

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.prism.log
2-
.vscode
32
_dev
43

54
__pycache__

.release-please-manifest.json

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

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.analysis.importFormat": "relative",
3+
}

CHANGELOG.md

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

3+
## 0.8.0 (2025-07-25)
4+
5+
Full Changelog: [v0.7.0...v0.8.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.7.0...v0.8.0)
6+
7+
### Features
8+
9+
* clean up environment call outs ([3ee6948](https://github.com/isaacus-dev/isaacus-python/commit/3ee69481b6a6198503d06c6aa137ba69f7940db6))
10+
* **client:** add support for aiohttp ([fba17e9](https://github.com/isaacus-dev/isaacus-python/commit/fba17e98279aa6d93dd3c9b6f9b95246b4fac813))
11+
12+
13+
### Bug Fixes
14+
15+
* **ci:** correct conditional ([53c81d9](https://github.com/isaacus-dev/isaacus-python/commit/53c81d9e14882ae83a72c15481c8933226e668fa))
16+
* **ci:** release-doctor — report correct token name ([3cb8672](https://github.com/isaacus-dev/isaacus-python/commit/3cb8672052edf1d1c4e72a5866fde3776d43a4e2))
17+
* **client:** correctly parse binary response | stream ([5e316fe](https://github.com/isaacus-dev/isaacus-python/commit/5e316feaf5270e54321a917a9cd59efb2c42fcb3))
18+
* **client:** don't send Content-Type header on GET requests ([2a5d531](https://github.com/isaacus-dev/isaacus-python/commit/2a5d531e7553aa012352d9dd85d280f4374b7ae7))
19+
* **parsing:** correctly handle nested discriminated unions ([c5d5715](https://github.com/isaacus-dev/isaacus-python/commit/c5d571569cdafad9bd1392baf232287dca72855d))
20+
* **parsing:** ignore empty metadata ([dd88d17](https://github.com/isaacus-dev/isaacus-python/commit/dd88d179302966445c63831f4b6f20491fe5632e))
21+
* **parsing:** parse extra field types ([ba334c7](https://github.com/isaacus-dev/isaacus-python/commit/ba334c75676c37da235abfddd7c9746f89307c22))
22+
* **tests:** fix: tests which call HTTP endpoints directly with the example parameters ([638c7c4](https://github.com/isaacus-dev/isaacus-python/commit/638c7c4df7ecbc189480a0cba2d93125f9b97d2f))
23+
24+
25+
### Chores
26+
27+
* **ci:** change upload type ([e79525c](https://github.com/isaacus-dev/isaacus-python/commit/e79525c4ffe9601c3b7c5e39a94c93c248cfbf33))
28+
* **ci:** enable for pull requests ([29244fd](https://github.com/isaacus-dev/isaacus-python/commit/29244fdb33a5706480e1c7314099a14ae177ee06))
29+
* **ci:** only run for pushes and fork pull requests ([94ed1eb](https://github.com/isaacus-dev/isaacus-python/commit/94ed1ebf9fc4111236f1db2a5d326f081079bdc8))
30+
* **internal:** bump pinned h11 dep ([5836163](https://github.com/isaacus-dev/isaacus-python/commit/58361635226de79f5ff27e953ec03dfeb392b3e0))
31+
* **internal:** codegen related update ([cdfe0be](https://github.com/isaacus-dev/isaacus-python/commit/cdfe0beceeeaa21e4a24b6cdc86264dcaa3808f1))
32+
* **internal:** update conftest.py ([e4a5936](https://github.com/isaacus-dev/isaacus-python/commit/e4a59368bd7d42d65fd368b03a208b2aa32a9144))
33+
* **package:** mark python 3.13 as supported ([0f7b5d1](https://github.com/isaacus-dev/isaacus-python/commit/0f7b5d1c588adf28b502727948dceaa9ed54ee86))
34+
* **project:** add settings file for vscode ([d6435b0](https://github.com/isaacus-dev/isaacus-python/commit/d6435b09a03f202867843ee83737b319ccef4ea6))
35+
* **readme:** fix version rendering on pypi ([b09f1ad](https://github.com/isaacus-dev/isaacus-python/commit/b09f1ad5ce2624d23a32fc1d966f7d9703cd4ad3))
36+
* **readme:** update badges ([cd48569](https://github.com/isaacus-dev/isaacus-python/commit/cd485693063d03f092d5be7f024b0f7e23da0897))
37+
* **tests:** add tests for httpx client instantiation & proxies ([5d2c5b9](https://github.com/isaacus-dev/isaacus-python/commit/5d2c5b9e20bd80acd05240217b6be3991b46aae2))
38+
* **tests:** run tests in parallel ([3f0e6da](https://github.com/isaacus-dev/isaacus-python/commit/3f0e6da6d9c6d9cd46cfa382da55a0b6a07d9d49))
39+
* **tests:** skip some failing tests on the latest python versions ([b2b3fa8](https://github.com/isaacus-dev/isaacus-python/commit/b2b3fa82b87e9cc7e23164cc5589b3e157e635df))
40+
41+
42+
### Documentation
43+
44+
* **client:** fix httpx.Timeout documentation reference ([b68d394](https://github.com/isaacus-dev/isaacus-python/commit/b68d3944df0ca58b7df3e89e06e90799f7ade25b))
45+
346
## 0.7.0 (2025-06-03)
447

548
Full Changelog: [v0.6.1...v0.7.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.6.1...v0.7.0)

README.md

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

3-
[![PyPI version](https://img.shields.io/pypi/v/isaacus.svg)](https://pypi.org/project/isaacus/)
3+
<!-- prettier-ignore -->
4+
[![PyPI version](https://img.shields.io/pypi/v/isaacus.svg?label=pypi%20(stable))](https://pypi.org/project/isaacus/)
45

56
The Isaacus Python library provides convenient access to the Isaacus REST API from any Python 3.8+
67
application. The library includes type definitions for all request params and response fields,
@@ -72,6 +73,41 @@ asyncio.run(main())
7273

7374
Functionality between the synchronous and asynchronous clients is otherwise identical.
7475

76+
### With aiohttp
77+
78+
By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
79+
80+
You can enable this by installing `aiohttp`:
81+
82+
```sh
83+
# install from PyPI
84+
pip install isaacus[aiohttp]
85+
```
86+
87+
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
88+
89+
```python
90+
import asyncio
91+
from isaacus import DefaultAioHttpClient
92+
from isaacus import AsyncIsaacus
93+
94+
95+
async def main() -> None:
96+
async with AsyncIsaacus(
97+
api_key="My API Key",
98+
http_client=DefaultAioHttpClient(),
99+
) as client:
100+
universal_classification = await client.classifications.universal.create(
101+
model="kanon-universal-classifier",
102+
query="This is a confidentiality clause.",
103+
texts=["I agree not to tell anyone about the document."],
104+
)
105+
print(universal_classification.classifications)
106+
107+
108+
asyncio.run(main())
109+
```
110+
75111
## Using types
76112

77113
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:
@@ -176,7 +212,7 @@ client.with_options(max_retries=5).classifications.universal.create(
176212
### Timeouts
177213

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

181217
```python
182218
from isaacus import Isaacus

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 ISAACUS_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: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "isaacus"
3-
version = "0.7.0"
3+
version = "0.8.0"
44
description = "The official Python library for the isaacus API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -24,6 +24,7 @@ classifiers = [
2424
"Programming Language :: Python :: 3.10",
2525
"Programming Language :: Python :: 3.11",
2626
"Programming Language :: Python :: 3.12",
27+
"Programming Language :: Python :: 3.13",
2728
"Operating System :: OS Independent",
2829
"Operating System :: POSIX",
2930
"Operating System :: MacOS",
@@ -37,6 +38,8 @@ classifiers = [
3738
Homepage = "https://github.com/isaacus-dev/isaacus-python"
3839
Repository = "https://github.com/isaacus-dev/isaacus-python"
3940

41+
[project.optional-dependencies]
42+
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
4043

4144
[tool.rye]
4245
managed = true
@@ -54,6 +57,7 @@ dev-dependencies = [
5457
"importlib-metadata>=6.7.0",
5558
"rich>=13.7.1",
5659
"nest_asyncio==1.6.0",
60+
"pytest-xdist>=3.6.1",
5761
]
5862

5963
[tool.rye.scripts]
@@ -125,7 +129,7 @@ replacement = '[\1](https://github.com/isaacus-dev/isaacus-python/tree/main/\g<2
125129

126130
[tool.pytest.ini_options]
127131
testpaths = ["tests"]
128-
addopts = "--tb=short"
132+
addopts = "--tb=short -n auto"
129133
xfail_strict = true
130134
asyncio_mode = "auto"
131135
asyncio_default_fixture_loop_scope = "session"

requirements-dev.lock

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,24 @@
1010
# universal: false
1111

1212
-e file:.
13+
aiohappyeyeballs==2.6.1
14+
# via aiohttp
15+
aiohttp==3.12.8
16+
# via httpx-aiohttp
17+
# via isaacus
18+
aiosignal==1.3.2
19+
# via aiohttp
1320
annotated-types==0.6.0
1421
# via pydantic
1522
anyio==4.4.0
1623
# via httpx
1724
# via isaacus
1825
argcomplete==3.1.2
1926
# via nox
27+
async-timeout==5.0.1
28+
# via aiohttp
29+
attrs==25.3.0
30+
# via aiohttp
2031
certifi==2023.7.22
2132
# via httpcore
2233
# via httpx
@@ -30,25 +41,37 @@ distro==1.8.0
3041
exceptiongroup==1.2.2
3142
# via anyio
3243
# via pytest
44+
execnet==2.1.1
45+
# via pytest-xdist
3346
filelock==3.12.4
3447
# via virtualenv
35-
h11==0.14.0
48+
frozenlist==1.6.2
49+
# via aiohttp
50+
# via aiosignal
51+
h11==0.16.0
3652
# via httpcore
37-
httpcore==1.0.2
53+
httpcore==1.0.9
3854
# via httpx
3955
httpx==0.28.1
56+
# via httpx-aiohttp
4057
# via isaacus
4158
# via respx
59+
httpx-aiohttp==0.1.8
60+
# via isaacus
4261
idna==3.4
4362
# via anyio
4463
# via httpx
64+
# via yarl
4565
importlib-metadata==7.0.0
4666
iniconfig==2.0.0
4767
# via pytest
4868
markdown-it-py==3.0.0
4969
# via rich
5070
mdurl==0.1.2
5171
# via markdown-it-py
72+
multidict==6.4.4
73+
# via aiohttp
74+
# via yarl
5275
mypy==1.14.1
5376
mypy-extensions==1.0.0
5477
# via mypy
@@ -63,6 +86,9 @@ platformdirs==3.11.0
6386
# via virtualenv
6487
pluggy==1.5.0
6588
# via pytest
89+
propcache==0.3.1
90+
# via aiohttp
91+
# via yarl
6692
pydantic==2.10.3
6793
# via isaacus
6894
pydantic-core==2.27.1
@@ -72,7 +98,9 @@ pygments==2.18.0
7298
pyright==1.1.399
7399
pytest==8.3.3
74100
# via pytest-asyncio
101+
# via pytest-xdist
75102
pytest-asyncio==0.24.0
103+
pytest-xdist==3.7.0
76104
python-dateutil==2.8.2
77105
# via time-machine
78106
pytz==2023.3.post1
@@ -94,11 +122,14 @@ tomli==2.0.2
94122
typing-extensions==4.12.2
95123
# via anyio
96124
# via isaacus
125+
# via multidict
97126
# via mypy
98127
# via pydantic
99128
# via pydantic-core
100129
# via pyright
101130
virtualenv==20.24.5
102131
# via nox
132+
yarl==1.20.0
133+
# via aiohttp
103134
zipp==3.17.0
104135
# via importlib-metadata

requirements.lock

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,51 @@
1010
# universal: false
1111

1212
-e file:.
13+
aiohappyeyeballs==2.6.1
14+
# via aiohttp
15+
aiohttp==3.12.8
16+
# via httpx-aiohttp
17+
# via isaacus
18+
aiosignal==1.3.2
19+
# via aiohttp
1320
annotated-types==0.6.0
1421
# via pydantic
1522
anyio==4.4.0
1623
# via httpx
1724
# via isaacus
25+
async-timeout==5.0.1
26+
# via aiohttp
27+
attrs==25.3.0
28+
# via aiohttp
1829
certifi==2023.7.22
1930
# via httpcore
2031
# via httpx
2132
distro==1.8.0
2233
# via isaacus
2334
exceptiongroup==1.2.2
2435
# via anyio
25-
h11==0.14.0
36+
frozenlist==1.6.2
37+
# via aiohttp
38+
# via aiosignal
39+
h11==0.16.0
2640
# via httpcore
27-
httpcore==1.0.2
41+
httpcore==1.0.9
2842
# via httpx
2943
httpx==0.28.1
44+
# via httpx-aiohttp
45+
# via isaacus
46+
httpx-aiohttp==0.1.8
3047
# via isaacus
3148
idna==3.4
3249
# via anyio
3350
# via httpx
51+
# via yarl
52+
multidict==6.4.4
53+
# via aiohttp
54+
# via yarl
55+
propcache==0.3.1
56+
# via aiohttp
57+
# via yarl
3458
pydantic==2.10.3
3559
# via isaacus
3660
pydantic-core==2.27.1
@@ -41,5 +65,8 @@ sniffio==1.3.0
4165
typing-extensions==4.12.2
4266
# via anyio
4367
# via isaacus
68+
# via multidict
4469
# via pydantic
4570
# via pydantic-core
71+
yarl==1.20.0
72+
# via aiohttp

0 commit comments

Comments
 (0)