Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b9e057f
chore(internal): bump pinned h11 dep
stainless-app[bot] Jul 9, 2025
144f8ca
chore(package): mark python 3.13 as supported
stainless-app[bot] Jul 9, 2025
79004f8
fix(parsing): correctly handle nested discriminated unions
stainless-app[bot] Jul 10, 2025
3ccc314
chore(readme): fix version rendering on pypi
stainless-app[bot] Jul 11, 2025
dfd4e86
fix(client): don't send Content-Type header on GET requests
stainless-app[bot] Jul 12, 2025
de35b9d
feat: clean up environment call outs
stainless-app[bot] Jul 15, 2025
a8b35a8
fix(parsing): ignore empty metadata
stainless-app[bot] Jul 22, 2025
5530ece
fix(parsing): parse extra field types
stainless-app[bot] Jul 23, 2025
c4f8607
chore(project): add settings file for vscode
stainless-app[bot] Jul 25, 2025
4e03611
feat(client): support file upload requests
stainless-app[bot] Jul 31, 2025
80e5aae
chore(internal): fix ruff target version
stainless-app[bot] Aug 6, 2025
0deb0ff
chore: update @stainless-api/prism-cli to v5.15.0
stainless-app[bot] Aug 9, 2025
e5a7e0f
chore(internal): update comment in script
stainless-app[bot] Aug 9, 2025
7e76e08
chore: update github action
stainless-app[bot] Aug 22, 2025
bb0ac37
chore(internal): change ci workflow machines
stainless-app[bot] Aug 26, 2025
8f77952
fix: avoid newer type syntax
stainless-app[bot] Aug 27, 2025
0c89992
chore(internal): update pyright exclude list
stainless-app[bot] Aug 27, 2025
856feb3
chore(internal): add Sequence related utils
stainless-app[bot] Aug 30, 2025
37625fd
feat(types): replace List[str] with SequenceNotStr in params
stainless-app[bot] Sep 3, 2025
372675f
feat: improve future compat with pydantic v3
stainless-app[bot] Sep 4, 2025
97977db
chore(internal): move mypy configurations to `pyproject.toml` file
stainless-app[bot] Sep 5, 2025
ae111a6
chore(tests): simplify `get_platform` test
stainless-app[bot] Sep 6, 2025
7b6f1c5
feat(api): manual updates
stainless-app[bot] Nov 24, 2025
997eb22
codegen metadata
stainless-app[bot] Nov 24, 2025
335af27
release: 0.1.0-alpha.7
stainless-app[bot] Nov 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ jobs:
run: ./scripts/lint

build:
if: github.repository == 'stainless-sdks/zeroentropy-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
timeout-minutes: 10
name: build
permissions:
contents: read
id-token: write
runs-on: depot-ubuntu-24.04
runs-on: ${{ github.repository == 'stainless-sdks/zeroentropy-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4

Expand All @@ -61,12 +61,14 @@ jobs:
run: rye build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/zeroentropy-python'
id: github-oidc
uses: actions/github-script@v6
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/zeroentropy-python'
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.prism.log
.vscode
_dev

__pycache__
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.6"
".": "0.1.0-alpha.7"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 14
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zeroentropy%2Fzeroentropy-bd2f55f423e09b74f83cbad6034fb76f7052363308d02533a908b49543cff459.yml
openapi_spec_hash: 6d7566ebda7fecac4069744949d547e0
config_hash: e07cdee04c971e1db74e91a5a4cd981c
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/zeroentropy%2Fzeroentropy-c95681b13dc56e64126746c6e546b564c7f802ae567fc9ccc1aeb8eddd40bb1e.yml
openapi_spec_hash: 2ac723122fe938e384f11b5cf19e85ec
config_hash: 3be2ee54cbc850c508c90b9ffae2efe5
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.analysis.importFormat": "relative",
}
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Changelog

## 0.1.0-alpha.7 (2025-11-24)

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

### Features

* **api:** manual updates ([7b6f1c5](https://github.com/zeroentropy-ai/zeroentropy-python/commit/7b6f1c52caff5579b0f42534ae393bf2bd634e2b))
* clean up environment call outs ([de35b9d](https://github.com/zeroentropy-ai/zeroentropy-python/commit/de35b9dc8c136eeaa0909076488f152a5f885398))
* **client:** support file upload requests ([4e03611](https://github.com/zeroentropy-ai/zeroentropy-python/commit/4e036110dec2d075f4de4cf44691c131dfa545b7))
* improve future compat with pydantic v3 ([372675f](https://github.com/zeroentropy-ai/zeroentropy-python/commit/372675f01b9fd520b0f49749b85314a3333dfa2a))
* **types:** replace List[str] with SequenceNotStr in params ([37625fd](https://github.com/zeroentropy-ai/zeroentropy-python/commit/37625fd6bb4efb5a4926e565eaa7b25852d75f51))


### Bug Fixes

* avoid newer type syntax ([8f77952](https://github.com/zeroentropy-ai/zeroentropy-python/commit/8f7795235684015a6cd419e2bab68b99ecf63b23))
* **client:** don't send Content-Type header on GET requests ([dfd4e86](https://github.com/zeroentropy-ai/zeroentropy-python/commit/dfd4e866616c9c7e9fa6ffa3b757abf6d8cd9ebc))
* **parsing:** correctly handle nested discriminated unions ([79004f8](https://github.com/zeroentropy-ai/zeroentropy-python/commit/79004f855735cc872d0050f781bf8b84d04fd592))
* **parsing:** ignore empty metadata ([a8b35a8](https://github.com/zeroentropy-ai/zeroentropy-python/commit/a8b35a89d5b113eb662bd3113c9433dc5f1382f9))
* **parsing:** parse extra field types ([5530ece](https://github.com/zeroentropy-ai/zeroentropy-python/commit/5530ece04b51a3300c4202b66d4e50101c374a60))


### Chores

* **internal:** add Sequence related utils ([856feb3](https://github.com/zeroentropy-ai/zeroentropy-python/commit/856feb326411abd1fc736eee5a64401f526285ca))
* **internal:** bump pinned h11 dep ([b9e057f](https://github.com/zeroentropy-ai/zeroentropy-python/commit/b9e057f0827b8ed5851ec7e7a8b9ed622019f065))
* **internal:** change ci workflow machines ([bb0ac37](https://github.com/zeroentropy-ai/zeroentropy-python/commit/bb0ac37c96cf27acdcc4e578e9419cbe4a457e18))
* **internal:** fix ruff target version ([80e5aae](https://github.com/zeroentropy-ai/zeroentropy-python/commit/80e5aae0af40e80b5962b0dbf2d5351d9df4432e))
* **internal:** move mypy configurations to `pyproject.toml` file ([97977db](https://github.com/zeroentropy-ai/zeroentropy-python/commit/97977db20f3f27cb1b01f4be6e3538796c0a5414))
* **internal:** update comment in script ([e5a7e0f](https://github.com/zeroentropy-ai/zeroentropy-python/commit/e5a7e0f1592dcfe868064dcdea1446b358662461))
* **internal:** update pyright exclude list ([0c89992](https://github.com/zeroentropy-ai/zeroentropy-python/commit/0c89992ab3ef88427c150b72fe510e26a202db43))
* **package:** mark python 3.13 as supported ([144f8ca](https://github.com/zeroentropy-ai/zeroentropy-python/commit/144f8ca076c92c7e68403d6a0a49ce1caeee69b9))
* **project:** add settings file for vscode ([c4f8607](https://github.com/zeroentropy-ai/zeroentropy-python/commit/c4f86076c0b09422a445ffa91e6880a085fabacd))
* **readme:** fix version rendering on pypi ([3ccc314](https://github.com/zeroentropy-ai/zeroentropy-python/commit/3ccc314b021100775fe854d7225405c63b299599))
* **tests:** simplify `get_platform` test ([ae111a6](https://github.com/zeroentropy-ai/zeroentropy-python/commit/ae111a642a1da930f319ce62f1a28f203881cfe5))
* update @stainless-api/prism-cli to v5.15.0 ([0deb0ff](https://github.com/zeroentropy-ai/zeroentropy-python/commit/0deb0ff394e034254520520675869023912cecc1))
* update github action ([7e76e08](https://github.com/zeroentropy-ai/zeroentropy-python/commit/7e76e087f68489a4a24ac990d48dd665d81f7181))

## 0.1.0-alpha.6 (2025-07-08)

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)
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# ZeroEntropy Python SDK

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

The ZeroEntropy Python SDK provides convenient access to the [ZeroEntropy REST API](https://docs.zeroentropy.dev/api-reference/) from any Python 3.8+
application.
The ZeroEntropy Python SDK provides convenient type-safe access to the [ZeroEntropy REST API](https://docs.zeroentropy.dev/api-reference/) from any Python 3.9+ application.

In order to get an API Key, you can visit our [dashboard](https://dashboard.zeroentropy.dev/).

Expand Down Expand Up @@ -93,15 +93,14 @@ pip install --pre zeroentropy[aiohttp]
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

```python
import os
import asyncio
from zeroentropy import DefaultAioHttpClient
from zeroentropy import AsyncZeroEntropy


async def main() -> None:
async with AsyncZeroEntropy(
api_key=os.environ.get("ZEROENTROPY_API_KEY"), # This is the default and can be omitted
api_key="My API Key",
http_client=DefaultAioHttpClient(),
) as client:
response = await client.documents.add(
Expand Down Expand Up @@ -449,7 +448,7 @@ print(zeroentropy.__version__)

## Requirements

Python 3.8 or higher.
Python 3.9 or higher.

## Contributing

Expand Down
50 changes: 0 additions & 50 deletions mypy.ini

This file was deleted.

71 changes: 64 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "zeroentropy"
version = "0.1.0-alpha.6"
version = "0.1.0-alpha.7"
description = "The official Python library for the ZeroEntropy API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand All @@ -15,15 +15,16 @@ dependencies = [
"distro>=1.7.0, <2",
"sniffio",
]
requires-python = ">= 3.8"
requires-python = ">= 3.9"
classifiers = [
"Typing :: Typed",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
Expand All @@ -38,7 +39,7 @@ Homepage = "https://github.com/zeroentropy-ai/zeroentropy-python"
Repository = "https://github.com/zeroentropy-ai/zeroentropy-python"

[project.optional-dependencies]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]

[tool.rye]
managed = true
Expand All @@ -55,7 +56,6 @@ dev-dependencies = [
"dirty-equals>=0.6.0",
"importlib-metadata>=6.7.0",
"rich>=13.7.1",
"nest_asyncio==1.6.0",
"pytest-xdist>=3.6.1",
]

Expand Down Expand Up @@ -141,12 +141,13 @@ filterwarnings = [
# there are a couple of flags that are still disabled by
# default in strict mode as they are experimental and niche.
typeCheckingMode = "strict"
pythonVersion = "3.8"
pythonVersion = "3.9"

exclude = [
"_dev",
".venv",
".nox",
".git",
]

reportImplicitOverride = true
Expand All @@ -155,10 +156,62 @@ reportOverlappingOverload = false
reportImportCycles = false
reportPrivateUsage = false

[tool.mypy]
pretty = true
show_error_codes = true

# Exclude _files.py because mypy isn't smart enough to apply
# the correct type narrowing and as this is an internal module
# it's fine to just use Pyright.
#
# We also exclude our `tests` as mypy doesn't always infer
# types correctly and Pyright will still catch any type errors.
exclude = ['src/zeroentropy/_files.py', '_dev/.*.py', 'tests/.*']

strict_equality = true
implicit_reexport = true
check_untyped_defs = true
no_implicit_optional = true

warn_return_any = true
warn_unreachable = true
warn_unused_configs = true

# Turn these options off as it could cause conflicts
# with the Pyright options.
warn_unused_ignores = false
warn_redundant_casts = false

disallow_any_generics = true
disallow_untyped_defs = true
disallow_untyped_calls = true
disallow_subclassing_any = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
cache_fine_grained = true

# By default, mypy reports an error if you assign a value to the result
# of a function call that doesn't return anything. We do this in our test
# cases:
# ```
# result = ...
# assert result is None
# ```
# Changing this codegen to make mypy happy would increase complexity
# and would not be worth it.
disable_error_code = "func-returns-value,overload-cannot-match"

# https://github.com/python/mypy/issues/12162
[[tool.mypy.overrides]]
module = "black.files.*"
ignore_errors = true
ignore_missing_imports = true


[tool.ruff]
line-length = 120
output-format = "grouped"
target-version = "py37"
target-version = "py38"

[tool.ruff.format]
docstring-code-format = true
Expand All @@ -171,6 +224,8 @@ select = [
"B",
# remove unused imports
"F401",
# check for missing future annotations
"FA102",
# bare except statements
"E722",
# unused arguments
Expand All @@ -193,6 +248,8 @@ unfixable = [
"T203",
]

extend-safe-fixes = ["FA102"]

[tool.ruff.lint.flake8-tidy-imports.banned-api]
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"

Expand Down
14 changes: 8 additions & 6 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ filelock==3.12.4
frozenlist==1.6.2
# via aiohttp
# via aiosignal
h11==0.14.0
h11==0.16.0
# via httpcore
httpcore==1.0.2
httpcore==1.0.9
# via httpx
httpx==0.28.1
# via httpx-aiohttp
# via respx
# via zeroentropy
httpx-aiohttp==0.1.8
httpx-aiohttp==0.1.9
# via zeroentropy
idna==3.4
# via anyio
Expand All @@ -75,7 +75,6 @@ multidict==6.4.4
mypy==1.14.1
mypy-extensions==1.0.0
# via mypy
nest-asyncio==1.6.0
nodeenv==1.8.0
# via pyright
nox==2023.4.22
Expand All @@ -89,9 +88,9 @@ pluggy==1.5.0
propcache==0.3.1
# via aiohttp
# via yarl
pydantic==2.10.3
pydantic==2.11.9
# via zeroentropy
pydantic-core==2.27.1
pydantic-core==2.33.2
# via pydantic
pygments==2.18.0
# via rich
Expand Down Expand Up @@ -126,7 +125,10 @@ typing-extensions==4.12.2
# via pydantic
# via pydantic-core
# via pyright
# via typing-inspection
# via zeroentropy
typing-inspection==0.4.1
# via pydantic
virtualenv==20.24.5
# via nox
yarl==1.20.0
Expand Down
Loading