Skip to content

Commit b1545be

Browse files
authored
Merge pull request #51 from zeroentropy-ai/release-please--branches--main--changes--next
release: 0.1.0-alpha.6
2 parents 8f817c7 + 78b8dc7 commit b1545be

Some content is hidden

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

44 files changed

+848
-783
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/zeroentropy-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/zeroentropy-python'
38+
build:
39+
if: github.repository == 'stainless-sdks/zeroentropy-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/zeroentropy-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-
".": "0.1.0-alpha.5"
2+
".": "0.1.0-alpha.6"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 15
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zeroentropy%2Fzeroentropy-f06c49dfd4b38a4f9d5bcad56348156bbf641aa8b7968acfbf655ad6ceff2126.yml
3-
openapi_spec_hash: cac52dd65fbcb65ffa7a183e764b7f06
4-
config_hash: beba80a17ba64c5439712e85129ab5ad
1+
configured_endpoints: 14
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zeroentropy%2Fzeroentropy-bd2f55f423e09b74f83cbad6034fb76f7052363308d02533a908b49543cff459.yml
3+
openapi_spec_hash: 6d7566ebda7fecac4069744949d547e0
4+
config_hash: e07cdee04c971e1db74e91a5a4cd981c

CHANGELOG.md

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

3+
## 0.1.0-alpha.6 (2025-07-08)
4+
5+
Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/zeroentropy-ai/zeroentropy-python/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)
6+
7+
### Features
8+
9+
* **api:** manual updates ([b6616f5](https://github.com/zeroentropy-ai/zeroentropy-python/commit/b6616f523b9dd5a4a3f9142bf2a561b560767492))
10+
* **api:** manual updates ([8752560](https://github.com/zeroentropy-ai/zeroentropy-python/commit/875256098555c768cd90d459df84e7cdcb4244ce))
11+
* **api:** manual updates ([11c83ad](https://github.com/zeroentropy-ai/zeroentropy-python/commit/11c83ad2bc4942f703bd255301816eb3a99682b7))
12+
* **api:** manual updates ([801513a](https://github.com/zeroentropy-ai/zeroentropy-python/commit/801513aefc80ac3345bb8d9995d558e576d3c58e))
13+
* **client:** add support for aiohttp ([3aa7ee2](https://github.com/zeroentropy-ai/zeroentropy-python/commit/3aa7ee28445efc3285b1ce79d6b7959d18bf7425))
14+
15+
16+
### Bug Fixes
17+
18+
* **ci:** correct conditional ([6ab3ba2](https://github.com/zeroentropy-ai/zeroentropy-python/commit/6ab3ba21090ea2c54dfd7b9aea8c1d86963cd046))
19+
* **ci:** release-doctor — report correct token name ([c9a55cb](https://github.com/zeroentropy-ai/zeroentropy-python/commit/c9a55cb8318c27c3acd8a84395cd295e348a05f9))
20+
* **client:** correctly parse binary response | stream ([f7b7ef9](https://github.com/zeroentropy-ai/zeroentropy-python/commit/f7b7ef9f45ff779734d1b6ee48349943bf14fce2))
21+
* **tests:** fix: tests which call HTTP endpoints directly with the example parameters ([027e535](https://github.com/zeroentropy-ai/zeroentropy-python/commit/027e535f70651ff5f6b0df8eb3a9786e31241896))
22+
23+
24+
### Chores
25+
26+
* **ci:** change upload type ([cb76da7](https://github.com/zeroentropy-ai/zeroentropy-python/commit/cb76da7ab4ab322268bd7663f5371893ff851a05))
27+
* **ci:** enable for pull requests ([fb3b81d](https://github.com/zeroentropy-ai/zeroentropy-python/commit/fb3b81d7b36b9242b56ed8e5e928272857a82aac))
28+
* **ci:** only run for pushes and fork pull requests ([ff5c91d](https://github.com/zeroentropy-ai/zeroentropy-python/commit/ff5c91d9ebca88bad06e0b9b1c62cd013dcf1b9b))
29+
* **internal:** update conftest.py ([0ddbc5a](https://github.com/zeroentropy-ai/zeroentropy-python/commit/0ddbc5ac04d55067056a50b6ad38b9afc9be15c1))
30+
* **readme:** update badges ([e790eb4](https://github.com/zeroentropy-ai/zeroentropy-python/commit/e790eb48bfd89d6b384cd9382480574a83cee175))
31+
* **tests:** add tests for httpx client instantiation & proxies ([64a0a4c](https://github.com/zeroentropy-ai/zeroentropy-python/commit/64a0a4cb1b1c4f71b37174e748e91e0df7bcc2cc))
32+
* **tests:** run tests in parallel ([0261b3c](https://github.com/zeroentropy-ai/zeroentropy-python/commit/0261b3c5bb54b02fe84b42c2d0e41a5e43519adc))
33+
* **tests:** skip some failing tests on the latest python versions ([2cbe097](https://github.com/zeroentropy-ai/zeroentropy-python/commit/2cbe097a9ac15c6f87e7137788a44058bd966524))
34+
35+
36+
### Documentation
37+
38+
* **client:** fix httpx.Timeout documentation reference ([3cd4296](https://github.com/zeroentropy-ai/zeroentropy-python/commit/3cd4296f8fe24f373dba2100dc1bc389f8e3b496))
39+
340
## 0.1.0-alpha.5 (2025-06-04)
441

542
Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/zeroentropy-ai/zeroentropy-python/compare/v0.1.0-alpha.4...v0.1.0-alpha.5)

README.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ZeroEntropy Python SDK
22

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

55
The ZeroEntropy Python SDK provides convenient access to the [ZeroEntropy REST API](https://docs.zeroentropy.dev/api-reference/) from any Python 3.8+
66
application.
@@ -79,6 +79,45 @@ asyncio.run(main())
7979

8080
Functionality between the synchronous and asynchronous clients is otherwise identical.
8181

82+
### With aiohttp
83+
84+
By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
85+
86+
You can enable this by installing `aiohttp`:
87+
88+
```sh
89+
# install from PyPI
90+
pip install --pre zeroentropy[aiohttp]
91+
```
92+
93+
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
94+
95+
```python
96+
import os
97+
import asyncio
98+
from zeroentropy import DefaultAioHttpClient
99+
from zeroentropy import AsyncZeroEntropy
100+
101+
102+
async def main() -> None:
103+
async with AsyncZeroEntropy(
104+
api_key=os.environ.get("ZEROENTROPY_API_KEY"), # This is the default and can be omitted
105+
http_client=DefaultAioHttpClient(),
106+
) as client:
107+
response = await client.documents.add(
108+
collection_name="example_collection",
109+
content={
110+
"type": "text",
111+
"text": "Example Content",
112+
},
113+
path="my_document.txt",
114+
)
115+
print(response.message)
116+
117+
118+
asyncio.run(main())
119+
```
120+
82121
## Using types
83122

84123
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:
@@ -224,7 +263,7 @@ client.with_options(max_retries=5).status.get_status()
224263
### Timeouts
225264

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

229268
```python
230269
from zeroentropy import ZeroEntropy

api.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
# Admin
2-
3-
Types:
4-
5-
```python
6-
from zeroentropy.types import AdminCreateOrganizationResponse
7-
```
8-
9-
Methods:
10-
11-
- <code title="post /admin/create-organization">client.admin.<a href="./src/zeroentropy/resources/admin.py">create_organization</a>(\*\*<a href="src/zeroentropy/types/admin_create_organization_params.py">params</a>) -> <a href="./src/zeroentropy/types/admin_create_organization_response.py">AdminCreateOrganizationResponse</a></code>
12-
131
# Status
142

153
Types:
@@ -82,14 +70,14 @@ Methods:
8270
- <code title="post /queries/top-pages">client.queries.<a href="./src/zeroentropy/resources/queries.py">top_pages</a>(\*\*<a href="src/zeroentropy/types/query_top_pages_params.py">params</a>) -> <a href="./src/zeroentropy/types/query_top_pages_response.py">QueryTopPagesResponse</a></code>
8371
- <code title="post /queries/top-snippets">client.queries.<a href="./src/zeroentropy/resources/queries.py">top_snippets</a>(\*\*<a href="src/zeroentropy/types/query_top_snippets_params.py">params</a>) -> <a href="./src/zeroentropy/types/query_top_snippets_response.py">QueryTopSnippetsResponse</a></code>
8472

85-
# Parsers
73+
# Models
8674

8775
Types:
8876

8977
```python
90-
from zeroentropy.types import ParserParseDocumentResponse
78+
from zeroentropy.types import ModelRerankResponse
9179
```
9280

9381
Methods:
9482

95-
- <code title="post /parsers/parse-document">client.parsers.<a href="./src/zeroentropy/resources/parsers.py">parse_document</a>(\*\*<a href="src/zeroentropy/types/parser_parse_document_params.py">params</a>) -> <a href="./src/zeroentropy/types/parser_parse_document_response.py">ParserParseDocumentResponse</a></code>
83+
- <code title="post /models/rerank">client.models.<a href="./src/zeroentropy/resources/models.py">rerank</a>(\*\*<a href="src/zeroentropy/types/model_rerank_params.py">params</a>) -> <a href="./src/zeroentropy/types/model_rerank_response.py">ModelRerankResponse</a></code>

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 ZEROENTROPY_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 = "zeroentropy"
3-
version = "0.1.0-alpha.5"
3+
version = "0.1.0-alpha.6"
44
description = "The official Python library for the ZeroEntropy API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -37,6 +37,8 @@ classifiers = [
3737
Homepage = "https://github.com/zeroentropy-ai/zeroentropy-python"
3838
Repository = "https://github.com/zeroentropy-ai/zeroentropy-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/zeroentropy-ai/zeroentropy-python/tree/ma
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"

requirements-dev.lock

Lines changed: 31 additions & 0 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 zeroentropy
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 zeroentropy
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
48+
frozenlist==1.6.2
49+
# via aiohttp
50+
# via aiosignal
3551
h11==0.14.0
3652
# via httpcore
3753
httpcore==1.0.2
3854
# via httpx
3955
httpx==0.28.1
56+
# via httpx-aiohttp
4057
# via respx
4158
# via zeroentropy
59+
httpx-aiohttp==0.1.8
60+
# via zeroentropy
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 zeroentropy
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
@@ -93,12 +121,15 @@ tomli==2.0.2
93121
# via pytest
94122
typing-extensions==4.12.2
95123
# via anyio
124+
# via multidict
96125
# via mypy
97126
# via pydantic
98127
# via pydantic-core
99128
# via pyright
100129
# via zeroentropy
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

0 commit comments

Comments
 (0)