Skip to content

Commit 5799893

Browse files
feat(api): update via SDK Studio (#13)
1 parent 723864e commit 5799893

19 files changed

+279
-279
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2025 Zeroentropy
189+
Copyright 2025 ZeroEntropy
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Zeroentropy Python API library
1+
# ZeroEntropy Python API library
22

33
[![PyPI version](https://img.shields.io/pypi/v/zeroentropy.svg)](https://pypi.org/project/zeroentropy/)
44

5-
The Zeroentropy Python library provides convenient access to the Zeroentropy REST API from any Python 3.8+
5+
The ZeroEntropy Python library provides convenient access to the ZeroEntropy REST API from any Python 3.8+
66
application. The library includes type definitions for all request params and response fields,
77
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
88

@@ -23,9 +23,9 @@ The full API of this library can be found in [api.md](api.md).
2323

2424
```python
2525
import os
26-
from zeroentropy import Zeroentropy
26+
from zeroentropy import ZeroEntropy
2727

28-
client = Zeroentropy(
28+
client = ZeroEntropy(
2929
api_key=os.environ.get("ZEROENTROPY_API_KEY"), # This is the default and can be omitted
3030
)
3131

@@ -47,14 +47,14 @@ so that your API Key is not stored in source control.
4747

4848
## Async usage
4949

50-
Simply import `AsyncZeroentropy` instead of `Zeroentropy` and use `await` with each API call:
50+
Simply import `AsyncZeroEntropy` instead of `ZeroEntropy` and use `await` with each API call:
5151

5252
```python
5353
import os
5454
import asyncio
55-
from zeroentropy import AsyncZeroentropy
55+
from zeroentropy import AsyncZeroEntropy
5656

57-
client = AsyncZeroentropy(
57+
client = AsyncZeroEntropy(
5858
api_key=os.environ.get("ZEROENTROPY_API_KEY"), # This is the default and can be omitted
5959
)
6060

@@ -87,14 +87,14 @@ Typed requests and responses provide autocomplete and documentation within your
8787

8888
## Pagination
8989

90-
List methods in the Zeroentropy API are paginated.
90+
List methods in the ZeroEntropy API are paginated.
9191

9292
This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:
9393

9494
```python
95-
from zeroentropy import Zeroentropy
95+
from zeroentropy import ZeroEntropy
9696

97-
client = Zeroentropy()
97+
client = ZeroEntropy()
9898

9999
all_documents = []
100100
# Automatically fetches more pages as needed.
@@ -110,9 +110,9 @@ Or, asynchronously:
110110

111111
```python
112112
import asyncio
113-
from zeroentropy import AsyncZeroentropy
113+
from zeroentropy import AsyncZeroEntropy
114114

115-
client = AsyncZeroentropy()
115+
client = AsyncZeroEntropy()
116116

117117

118118
async def main() -> None:
@@ -167,9 +167,9 @@ All errors inherit from `zeroentropy.APIError`.
167167

168168
```python
169169
import zeroentropy
170-
from zeroentropy import Zeroentropy
170+
from zeroentropy import ZeroEntropy
171171

172-
client = Zeroentropy()
172+
client = ZeroEntropy()
173173

174174
try:
175175
client.status.get_status()
@@ -206,10 +206,10 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
206206
You can use the `max_retries` option to configure or disable retry settings:
207207

208208
```python
209-
from zeroentropy import Zeroentropy
209+
from zeroentropy import ZeroEntropy
210210

211211
# Configure the default for all requests:
212-
client = Zeroentropy(
212+
client = ZeroEntropy(
213213
# default is 2
214214
max_retries=0,
215215
)
@@ -224,16 +224,16 @@ By default requests time out after 1 minute. You can configure this with a `time
224224
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
225225

226226
```python
227-
from zeroentropy import Zeroentropy
227+
from zeroentropy import ZeroEntropy
228228

229229
# Configure the default for all requests:
230-
client = Zeroentropy(
230+
client = ZeroEntropy(
231231
# 20 seconds (default is 1 minute)
232232
timeout=20.0,
233233
)
234234

235235
# More granular control:
236-
client = Zeroentropy(
236+
client = ZeroEntropy(
237237
timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
238238
)
239239

@@ -276,9 +276,9 @@ if response.my_field is None:
276276
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
277277

278278
```py
279-
from zeroentropy import Zeroentropy
279+
from zeroentropy import ZeroEntropy
280280

281-
client = Zeroentropy()
281+
client = ZeroEntropy()
282282
response = client.status.with_raw_response.get_status()
283283
print(response.headers.get('X-My-Header'))
284284

@@ -350,9 +350,9 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
350350

351351
```python
352352
import httpx
353-
from zeroentropy import Zeroentropy, DefaultHttpxClient
353+
from zeroentropy import ZeroEntropy, DefaultHttpxClient
354354

355-
client = Zeroentropy(
355+
client = ZeroEntropy(
356356
# Or use the `ZEROENTROPY_BASE_URL` env var
357357
base_url="http://my.test.server.example.com:8083",
358358
http_client=DefaultHttpxClient(
@@ -373,9 +373,9 @@ client.with_options(http_client=DefaultHttpxClient(...))
373373
By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.
374374

375375
```py
376-
from zeroentropy import Zeroentropy
376+
from zeroentropy import ZeroEntropy
377377

378-
with Zeroentropy() as client:
378+
with ZeroEntropy() as client:
379379
# make requests here
380380
...
381381

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ 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 Zeroentropy please follow the respective company's security reporting guidelines.
19+
or products provided by ZeroEntropy please follow the respective company's security reporting guidelines.
2020

21-
### Zeroentropy Terms and Policies
21+
### ZeroEntropy Terms and Policies
2222

2323
Please contact [email protected] for any questions or concerns regarding security of our services.
2424

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "The official Python library for the zeroentropy API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
77
authors = [
8-
{ name = "Zeroentropy", email = "[email protected]" },
8+
{ name = "ZeroEntropy", email = "[email protected]" },
99
]
1010
dependencies = [
1111
"httpx>=0.23.0, <1",

src/zeroentropy/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
Transport,
1111
AsyncClient,
1212
AsyncStream,
13-
Zeroentropy,
13+
ZeroEntropy,
1414
RequestOptions,
15-
AsyncZeroentropy,
15+
AsyncZeroEntropy,
1616
)
1717
from ._models import BaseModel
1818
from ._version import __title__, __version__
@@ -26,7 +26,7 @@
2626
RateLimitError,
2727
APITimeoutError,
2828
BadRequestError,
29-
ZeroentropyError,
29+
ZeroEntropyError,
3030
APIConnectionError,
3131
AuthenticationError,
3232
InternalServerError,
@@ -47,7 +47,7 @@
4747
"NotGiven",
4848
"NOT_GIVEN",
4949
"Omit",
50-
"ZeroentropyError",
50+
"ZeroEntropyError",
5151
"APIError",
5252
"APIStatusError",
5353
"APITimeoutError",
@@ -67,8 +67,8 @@
6767
"AsyncClient",
6868
"Stream",
6969
"AsyncStream",
70-
"Zeroentropy",
71-
"AsyncZeroentropy",
70+
"ZeroEntropy",
71+
"AsyncZeroEntropy",
7272
"file_from_path",
7373
"BaseModel",
7474
"DEFAULT_TIMEOUT",

src/zeroentropy/_client.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from ._version import __version__
2727
from .resources import status, parsers, queries, documents, collections
2828
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
29-
from ._exceptions import APIStatusError, ZeroentropyError
29+
from ._exceptions import APIStatusError, ZeroEntropyError
3030
from ._base_client import (
3131
DEFAULT_MAX_RETRIES,
3232
SyncAPIClient,
@@ -38,21 +38,21 @@
3838
"Transport",
3939
"ProxiesTypes",
4040
"RequestOptions",
41-
"Zeroentropy",
42-
"AsyncZeroentropy",
41+
"ZeroEntropy",
42+
"AsyncZeroEntropy",
4343
"Client",
4444
"AsyncClient",
4545
]
4646

4747

48-
class Zeroentropy(SyncAPIClient):
48+
class ZeroEntropy(SyncAPIClient):
4949
status: status.StatusResource
5050
collections: collections.CollectionsResource
5151
documents: documents.DocumentsResource
5252
queries: queries.QueriesResource
5353
parsers: parsers.ParsersResource
54-
with_raw_response: ZeroentropyWithRawResponse
55-
with_streaming_response: ZeroentropyWithStreamedResponse
54+
with_raw_response: ZeroEntropyWithRawResponse
55+
with_streaming_response: ZeroEntropyWithStreamedResponse
5656

5757
# client options
5858
api_key: str
@@ -87,7 +87,7 @@ def __init__(
8787
if api_key is None:
8888
api_key = os.environ.get("ZEROENTROPY_API_KEY")
8989
if api_key is None:
90-
raise ZeroentropyError(
90+
raise ZeroEntropyError(
9191
"The api_key client option must be set either by passing api_key to the client or by setting the ZEROENTROPY_API_KEY environment variable"
9292
)
9393
self.api_key = api_key
@@ -113,8 +113,8 @@ def __init__(
113113
self.documents = documents.DocumentsResource(self)
114114
self.queries = queries.QueriesResource(self)
115115
self.parsers = parsers.ParsersResource(self)
116-
self.with_raw_response = ZeroentropyWithRawResponse(self)
117-
self.with_streaming_response = ZeroentropyWithStreamedResponse(self)
116+
self.with_raw_response = ZeroEntropyWithRawResponse(self)
117+
self.with_streaming_response = ZeroEntropyWithStreamedResponse(self)
118118

119119
@property
120120
@override
@@ -221,14 +221,14 @@ def _make_status_error(
221221
return APIStatusError(err_msg, response=response, body=body)
222222

223223

224-
class AsyncZeroentropy(AsyncAPIClient):
224+
class AsyncZeroEntropy(AsyncAPIClient):
225225
status: status.AsyncStatusResource
226226
collections: collections.AsyncCollectionsResource
227227
documents: documents.AsyncDocumentsResource
228228
queries: queries.AsyncQueriesResource
229229
parsers: parsers.AsyncParsersResource
230-
with_raw_response: AsyncZeroentropyWithRawResponse
231-
with_streaming_response: AsyncZeroentropyWithStreamedResponse
230+
with_raw_response: AsyncZeroEntropyWithRawResponse
231+
with_streaming_response: AsyncZeroEntropyWithStreamedResponse
232232

233233
# client options
234234
api_key: str
@@ -263,7 +263,7 @@ def __init__(
263263
if api_key is None:
264264
api_key = os.environ.get("ZEROENTROPY_API_KEY")
265265
if api_key is None:
266-
raise ZeroentropyError(
266+
raise ZeroEntropyError(
267267
"The api_key client option must be set either by passing api_key to the client or by setting the ZEROENTROPY_API_KEY environment variable"
268268
)
269269
self.api_key = api_key
@@ -289,8 +289,8 @@ def __init__(
289289
self.documents = documents.AsyncDocumentsResource(self)
290290
self.queries = queries.AsyncQueriesResource(self)
291291
self.parsers = parsers.AsyncParsersResource(self)
292-
self.with_raw_response = AsyncZeroentropyWithRawResponse(self)
293-
self.with_streaming_response = AsyncZeroentropyWithStreamedResponse(self)
292+
self.with_raw_response = AsyncZeroEntropyWithRawResponse(self)
293+
self.with_streaming_response = AsyncZeroEntropyWithStreamedResponse(self)
294294

295295
@property
296296
@override
@@ -397,42 +397,42 @@ def _make_status_error(
397397
return APIStatusError(err_msg, response=response, body=body)
398398

399399

400-
class ZeroentropyWithRawResponse:
401-
def __init__(self, client: Zeroentropy) -> None:
400+
class ZeroEntropyWithRawResponse:
401+
def __init__(self, client: ZeroEntropy) -> None:
402402
self.status = status.StatusResourceWithRawResponse(client.status)
403403
self.collections = collections.CollectionsResourceWithRawResponse(client.collections)
404404
self.documents = documents.DocumentsResourceWithRawResponse(client.documents)
405405
self.queries = queries.QueriesResourceWithRawResponse(client.queries)
406406
self.parsers = parsers.ParsersResourceWithRawResponse(client.parsers)
407407

408408

409-
class AsyncZeroentropyWithRawResponse:
410-
def __init__(self, client: AsyncZeroentropy) -> None:
409+
class AsyncZeroEntropyWithRawResponse:
410+
def __init__(self, client: AsyncZeroEntropy) -> None:
411411
self.status = status.AsyncStatusResourceWithRawResponse(client.status)
412412
self.collections = collections.AsyncCollectionsResourceWithRawResponse(client.collections)
413413
self.documents = documents.AsyncDocumentsResourceWithRawResponse(client.documents)
414414
self.queries = queries.AsyncQueriesResourceWithRawResponse(client.queries)
415415
self.parsers = parsers.AsyncParsersResourceWithRawResponse(client.parsers)
416416

417417

418-
class ZeroentropyWithStreamedResponse:
419-
def __init__(self, client: Zeroentropy) -> None:
418+
class ZeroEntropyWithStreamedResponse:
419+
def __init__(self, client: ZeroEntropy) -> None:
420420
self.status = status.StatusResourceWithStreamingResponse(client.status)
421421
self.collections = collections.CollectionsResourceWithStreamingResponse(client.collections)
422422
self.documents = documents.DocumentsResourceWithStreamingResponse(client.documents)
423423
self.queries = queries.QueriesResourceWithStreamingResponse(client.queries)
424424
self.parsers = parsers.ParsersResourceWithStreamingResponse(client.parsers)
425425

426426

427-
class AsyncZeroentropyWithStreamedResponse:
428-
def __init__(self, client: AsyncZeroentropy) -> None:
427+
class AsyncZeroEntropyWithStreamedResponse:
428+
def __init__(self, client: AsyncZeroEntropy) -> None:
429429
self.status = status.AsyncStatusResourceWithStreamingResponse(client.status)
430430
self.collections = collections.AsyncCollectionsResourceWithStreamingResponse(client.collections)
431431
self.documents = documents.AsyncDocumentsResourceWithStreamingResponse(client.documents)
432432
self.queries = queries.AsyncQueriesResourceWithStreamingResponse(client.queries)
433433
self.parsers = parsers.AsyncParsersResourceWithStreamingResponse(client.parsers)
434434

435435

436-
Client = Zeroentropy
436+
Client = ZeroEntropy
437437

438-
AsyncClient = AsyncZeroentropy
438+
AsyncClient = AsyncZeroEntropy

src/zeroentropy/_exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
]
1919

2020

21-
class ZeroentropyError(Exception):
21+
class ZeroEntropyError(Exception):
2222
pass
2323

2424

25-
class APIError(ZeroentropyError):
25+
class APIError(ZeroEntropyError):
2626
message: str
2727
request: httpx.Request
2828

0 commit comments

Comments
 (0)