isaacus 0.9.1__tar.gz → 0.10.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- isaacus-0.10.1/.release-please-manifest.json +3 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/CHANGELOG.md +47 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/LICENSE +1 -1
- {isaacus-0.9.1 → isaacus-0.10.1}/PKG-INFO +24 -6
- {isaacus-0.9.1 → isaacus-0.10.1}/README.md +21 -3
- {isaacus-0.9.1 → isaacus-0.10.1}/api.md +12 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/pyproject.toml +13 -11
- {isaacus-0.9.1 → isaacus-0.10.1}/requirements-dev.lock +62 -50
- {isaacus-0.9.1 → isaacus-0.10.1}/requirements.lock +20 -19
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_base_client.py +145 -13
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_client.py +216 -46
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_compat.py +3 -3
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_models.py +53 -16
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_streaming.py +12 -12
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_types.py +12 -2
- isaacus-0.10.1/src/isaacus/_utils/_json.py +35 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_utils/_sync.py +3 -31
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_utils/_utils.py +1 -1
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_version.py +1 -1
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/resources/__init__.py +14 -0
- isaacus-0.10.1/src/isaacus/resources/enrichments.py +224 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/resources/rerankings.py +2 -2
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/types/__init__.py +2 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/types/classifications/universal_classification_response.py +2 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/types/classifications/universal_create_params.py +3 -1
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/types/embedding_response.py +2 -0
- isaacus-0.10.1/src/isaacus/types/enrichment_create_params.py +40 -0
- isaacus-0.10.1/src/isaacus/types/enrichment_response.py +1458 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/types/extractions/answer_extraction_response.py +8 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/types/extractions/qa_create_params.py +3 -1
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/types/reranking_create_params.py +3 -1
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/types/reranking_response.py +2 -0
- isaacus-0.10.1/tests/api_resources/test_enrichments.py +118 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/test_client.py +383 -166
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/test_models.py +4 -4
- isaacus-0.10.1/tests/test_utils/test_json.py +126 -0
- isaacus-0.9.1/.release-please-manifest.json +0 -3
- {isaacus-0.9.1 → isaacus-0.10.1}/.gitignore +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/CONTRIBUTING.md +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/SECURITY.md +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/bin/check-release-environment +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/bin/publish-pypi +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/examples/.keep +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/noxfile.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/release-please-config.json +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/__init__.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_constants.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_exceptions.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_files.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_qs.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_resource.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_response.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_utils/__init__.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_utils/_compat.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_utils/_datetime_parse.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_utils/_logs.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_utils/_proxy.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_utils/_reflection.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_utils/_resources_proxy.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_utils/_streams.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_utils/_transform.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/_utils/_typing.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/lib/.keep +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/py.typed +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/resources/classifications/__init__.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/resources/classifications/classifications.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/resources/classifications/universal.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/resources/embeddings.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/resources/extractions/__init__.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/resources/extractions/extractions.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/resources/extractions/qa.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/types/classifications/__init__.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/types/embedding_create_params.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/src/isaacus/types/extractions/__init__.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/__init__.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/api_resources/__init__.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/api_resources/classifications/__init__.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/api_resources/classifications/test_universal.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/api_resources/extractions/__init__.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/api_resources/extractions/test_qa.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/api_resources/test_embeddings.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/api_resources/test_rerankings.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/conftest.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/sample_file.txt +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/test_deepcopy.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/test_extract_files.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/test_files.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/test_qs.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/test_required_args.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/test_response.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/test_streaming.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/test_transform.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/test_utils/test_datetime_parse.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/test_utils/test_proxy.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/test_utils/test_typing.py +0 -0
- {isaacus-0.9.1 → isaacus-0.10.1}/tests/utils.py +0 -0
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.1 (2026-02-03)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.10.0...v0.10.1](https://github.com/isaacus-dev/isaacus-python/compare/v0.10.0...v0.10.1)
|
|
6
|
+
|
|
7
|
+
### Documentation
|
|
8
|
+
|
|
9
|
+
* **api:** added examples to 200 response codes ([a92b0d7](https://github.com/isaacus-dev/isaacus-python/commit/a92b0d79fad4552d3be5442dec404791f08040e1))
|
|
10
|
+
|
|
11
|
+
## 0.10.0 (2026-02-03)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.9.1...v0.10.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.9.1...v0.10.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** add min max ([50ece81](https://github.com/isaacus-dev/isaacus-python/commit/50ece81e21c605fd2801e2037f52046afe32a7f4))
|
|
18
|
+
* **api:** switch to span objects for enrichment, note closed beta ([326b7dc](https://github.com/isaacus-dev/isaacus-python/commit/326b7dca713b9240bb6ea825f5361de804ca300b))
|
|
19
|
+
* **sdk:** add enrichments ([eb4057b](https://github.com/isaacus-dev/isaacus-python/commit/eb4057b54a26158aded93e0b943e9828c5457b39))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* **client:** close streams without requiring full consumption ([13eb93f](https://github.com/isaacus-dev/isaacus-python/commit/13eb93fea611507de440a4418b82de3aa8a06500))
|
|
25
|
+
* compat with Python 3.14 ([89ef152](https://github.com/isaacus-dev/isaacus-python/commit/89ef152681673c408e217ad44f51dba229f9d371))
|
|
26
|
+
* **compat:** update signatures of `model_dump` and `model_dump_json` for Pydantic v1 ([4d7b71d](https://github.com/isaacus-dev/isaacus-python/commit/4d7b71de78bdd83f00d16ec409c57cbe4dd01ebb))
|
|
27
|
+
* ensure streams are always closed ([c2ae554](https://github.com/isaacus-dev/isaacus-python/commit/c2ae554fd73a5f0d4c0f7eb9a2fa652669d38f2e))
|
|
28
|
+
* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([b89d4ce](https://github.com/isaacus-dev/isaacus-python/commit/b89d4ce184708ad0737ba7fc77f1afe270a8eb50))
|
|
29
|
+
* use async_to_httpx_files in patch method ([30ffab2](https://github.com/isaacus-dev/isaacus-python/commit/30ffab28e37d4f940e69f2afe199fad830f57ba0))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Chores
|
|
33
|
+
|
|
34
|
+
* add missing docstrings ([0c4e7d4](https://github.com/isaacus-dev/isaacus-python/commit/0c4e7d4039a6b60adccc39be7a98b9efdbbc3df4))
|
|
35
|
+
* add Python 3.14 classifier and testing ([083d4b6](https://github.com/isaacus-dev/isaacus-python/commit/083d4b600ddba22fc81c33da7dee079c97088c81))
|
|
36
|
+
* **deps:** mypy 1.18.1 has a regression, pin to 1.17 ([9612e35](https://github.com/isaacus-dev/isaacus-python/commit/9612e35c83634a774c507349b4cd211d4d8c2c84))
|
|
37
|
+
* **docs:** use environment variables for authentication in code snippets ([ac22598](https://github.com/isaacus-dev/isaacus-python/commit/ac2259872f666a3c0cdb57695623aa980e5bdf36))
|
|
38
|
+
* **internal/tests:** avoid race condition with implicit client cleanup ([871fa54](https://github.com/isaacus-dev/isaacus-python/commit/871fa54adcd54f3f5ffde794e4ae703e7913e6b7))
|
|
39
|
+
* **internal:** add missing files argument to base client ([669f50a](https://github.com/isaacus-dev/isaacus-python/commit/669f50a93bc5868ff80a48e0a29c4a53e362fa99))
|
|
40
|
+
* **internal:** grammar fix (it's -> its) ([84145f2](https://github.com/isaacus-dev/isaacus-python/commit/84145f233adddf8b55a24b0443a2f9c9dc5a4cbd))
|
|
41
|
+
* **package:** drop Python 3.8 support ([556d5d0](https://github.com/isaacus-dev/isaacus-python/commit/556d5d07c941f4e2c4b6e523756723ce5661c4b3))
|
|
42
|
+
* speedup initial import ([2d500ed](https://github.com/isaacus-dev/isaacus-python/commit/2d500ed45248bf120cd21236644d9573d563120b))
|
|
43
|
+
* update lockfile ([b53392a](https://github.com/isaacus-dev/isaacus-python/commit/b53392a51c7b7e8605880af51e53db044ad14d94))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
### Documentation
|
|
47
|
+
|
|
48
|
+
* **sdk:** specify example params ([f617346](https://github.com/isaacus-dev/isaacus-python/commit/f617346d3262a45594d34357e97fc616f5ddf9e9))
|
|
49
|
+
|
|
3
50
|
## 0.9.1 (2025-10-19)
|
|
4
51
|
|
|
5
52
|
Full Changelog: [v0.9.0...v0.9.1](https://github.com/isaacus-dev/isaacus-python/compare/v0.9.0...v0.9.1)
|
|
@@ -186,7 +186,7 @@
|
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
|
187
187
|
identification within third-party archives.
|
|
188
188
|
|
|
189
|
-
Copyright
|
|
189
|
+
Copyright 2026 Isaacus
|
|
190
190
|
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
192
|
you may not use this file except in compliance with the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: isaacus
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.1
|
|
4
4
|
Summary: The official Python library for the isaacus API
|
|
5
5
|
Project-URL: Homepage, https://github.com/isaacus-dev/isaacus-python
|
|
6
6
|
Project-URL: Repository, https://github.com/isaacus-dev/isaacus-python
|
|
@@ -13,15 +13,15 @@ Classifier: Operating System :: Microsoft :: Windows
|
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
14
|
Classifier: Operating System :: POSIX
|
|
15
15
|
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
23
|
Classifier: Typing :: Typed
|
|
24
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
25
|
Requires-Dist: anyio<5,>=3.5.0
|
|
26
26
|
Requires-Dist: distro<2,>=1.7.0
|
|
27
27
|
Requires-Dist: httpx<1,>=0.23.0
|
|
@@ -38,12 +38,21 @@ Description-Content-Type: text/markdown
|
|
|
38
38
|
<!-- prettier-ignore -->
|
|
39
39
|
[)](https://pypi.org/project/isaacus/)
|
|
40
40
|
|
|
41
|
-
The Isaacus Python library provides convenient access to the Isaacus REST API from any Python 3.
|
|
41
|
+
The Isaacus Python library provides convenient access to the Isaacus REST API from any Python 3.9+
|
|
42
42
|
application. The library includes type definitions for all request params and response fields,
|
|
43
43
|
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
|
|
44
44
|
|
|
45
45
|
It is generated with [Stainless](https://www.stainless.com/).
|
|
46
46
|
|
|
47
|
+
## MCP Server
|
|
48
|
+
|
|
49
|
+
Use the Isaacus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
|
|
50
|
+
|
|
51
|
+
[](https://cursor.com/en-US/install-mcp?name=isaacus-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImlzYWFjdXMtbWNwIl0sImVudiI6eyJJU0FBQ1VTX0FQSV9LRVkiOiJNeSBBUEkgS2V5In19)
|
|
52
|
+
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22isaacus-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22isaacus-mcp%22%5D%2C%22env%22%3A%7B%22ISAACUS_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)
|
|
53
|
+
|
|
54
|
+
> Note: You may need to set environment variables in your MCP client.
|
|
55
|
+
|
|
47
56
|
## Documentation
|
|
48
57
|
|
|
49
58
|
The REST API documentation can be found on [docs.isaacus.com](https://docs.isaacus.com). The full API of this library can be found in [api.md](https://github.com/isaacus-dev/isaacus-python/tree/main/api.md).
|
|
@@ -73,6 +82,7 @@ embedding_response = client.embeddings.create(
|
|
|
73
82
|
"Are restraints of trade enforceable under English law?",
|
|
74
83
|
"What is a non-compete clause?",
|
|
75
84
|
],
|
|
85
|
+
task="retrieval/query",
|
|
76
86
|
)
|
|
77
87
|
print(embedding_response.embeddings)
|
|
78
88
|
```
|
|
@@ -103,6 +113,7 @@ async def main() -> None:
|
|
|
103
113
|
"Are restraints of trade enforceable under English law?",
|
|
104
114
|
"What is a non-compete clause?",
|
|
105
115
|
],
|
|
116
|
+
task="retrieval/query",
|
|
106
117
|
)
|
|
107
118
|
print(embedding_response.embeddings)
|
|
108
119
|
|
|
@@ -126,6 +137,7 @@ pip install isaacus[aiohttp]
|
|
|
126
137
|
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
|
|
127
138
|
|
|
128
139
|
```python
|
|
140
|
+
import os
|
|
129
141
|
import asyncio
|
|
130
142
|
from isaacus import DefaultAioHttpClient
|
|
131
143
|
from isaacus import AsyncIsaacus
|
|
@@ -133,7 +145,7 @@ from isaacus import AsyncIsaacus
|
|
|
133
145
|
|
|
134
146
|
async def main() -> None:
|
|
135
147
|
async with AsyncIsaacus(
|
|
136
|
-
api_key="
|
|
148
|
+
api_key=os.environ.get("ISAACUS_API_KEY"), # This is the default and can be omitted
|
|
137
149
|
http_client=DefaultAioHttpClient(),
|
|
138
150
|
) as client:
|
|
139
151
|
embedding_response = await client.embeddings.create(
|
|
@@ -142,6 +154,7 @@ async def main() -> None:
|
|
|
142
154
|
"Are restraints of trade enforceable under English law?",
|
|
143
155
|
"What is a non-compete clause?",
|
|
144
156
|
],
|
|
157
|
+
task="retrieval/query",
|
|
145
158
|
)
|
|
146
159
|
print(embedding_response.embeddings)
|
|
147
160
|
|
|
@@ -202,6 +215,7 @@ try:
|
|
|
202
215
|
"Are restraints of trade enforceable under English law?",
|
|
203
216
|
"What is a non-compete clause?",
|
|
204
217
|
],
|
|
218
|
+
task="retrieval/query",
|
|
205
219
|
)
|
|
206
220
|
except isaacus.APIConnectionError as e:
|
|
207
221
|
print("The server could not be reached")
|
|
@@ -251,6 +265,7 @@ client.with_options(max_retries=5).embeddings.create(
|
|
|
251
265
|
"Are restraints of trade enforceable under English law?",
|
|
252
266
|
"What is a non-compete clause?",
|
|
253
267
|
],
|
|
268
|
+
task="retrieval/query",
|
|
254
269
|
)
|
|
255
270
|
```
|
|
256
271
|
|
|
@@ -280,6 +295,7 @@ client.with_options(timeout=5.0).embeddings.create(
|
|
|
280
295
|
"Are restraints of trade enforceable under English law?",
|
|
281
296
|
"What is a non-compete clause?",
|
|
282
297
|
],
|
|
298
|
+
task="retrieval/query",
|
|
283
299
|
)
|
|
284
300
|
```
|
|
285
301
|
|
|
@@ -324,6 +340,7 @@ client = Isaacus()
|
|
|
324
340
|
response = client.embeddings.with_raw_response.create(
|
|
325
341
|
model="kanon-2-embedder",
|
|
326
342
|
texts=["Are restraints of trade enforceable under English law?", "What is a non-compete clause?"],
|
|
343
|
+
task="retrieval/query",
|
|
327
344
|
)
|
|
328
345
|
print(response.headers.get('X-My-Header'))
|
|
329
346
|
|
|
@@ -348,6 +365,7 @@ with client.embeddings.with_streaming_response.create(
|
|
|
348
365
|
"Are restraints of trade enforceable under English law?",
|
|
349
366
|
"What is a non-compete clause?",
|
|
350
367
|
],
|
|
368
|
+
task="retrieval/query",
|
|
351
369
|
) as response:
|
|
352
370
|
print(response.headers.get("X-My-Header"))
|
|
353
371
|
|
|
@@ -458,7 +476,7 @@ print(isaacus.__version__)
|
|
|
458
476
|
|
|
459
477
|
## Requirements
|
|
460
478
|
|
|
461
|
-
Python 3.
|
|
479
|
+
Python 3.9 or higher.
|
|
462
480
|
|
|
463
481
|
## Contributing
|
|
464
482
|
|
|
@@ -3,12 +3,21 @@
|
|
|
3
3
|
<!-- prettier-ignore -->
|
|
4
4
|
[)](https://pypi.org/project/isaacus/)
|
|
5
5
|
|
|
6
|
-
The Isaacus Python library provides convenient access to the Isaacus REST API from any Python 3.
|
|
6
|
+
The Isaacus Python library provides convenient access to the Isaacus REST API from any Python 3.9+
|
|
7
7
|
application. The library includes type definitions for all request params and response fields,
|
|
8
8
|
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
|
|
9
9
|
|
|
10
10
|
It is generated with [Stainless](https://www.stainless.com/).
|
|
11
11
|
|
|
12
|
+
## MCP Server
|
|
13
|
+
|
|
14
|
+
Use the Isaacus MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
|
|
15
|
+
|
|
16
|
+
[](https://cursor.com/en-US/install-mcp?name=isaacus-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImlzYWFjdXMtbWNwIl0sImVudiI6eyJJU0FBQ1VTX0FQSV9LRVkiOiJNeSBBUEkgS2V5In19)
|
|
17
|
+
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22isaacus-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22isaacus-mcp%22%5D%2C%22env%22%3A%7B%22ISAACUS_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)
|
|
18
|
+
|
|
19
|
+
> Note: You may need to set environment variables in your MCP client.
|
|
20
|
+
|
|
12
21
|
## Documentation
|
|
13
22
|
|
|
14
23
|
The REST API documentation can be found on [docs.isaacus.com](https://docs.isaacus.com). The full API of this library can be found in [api.md](api.md).
|
|
@@ -38,6 +47,7 @@ embedding_response = client.embeddings.create(
|
|
|
38
47
|
"Are restraints of trade enforceable under English law?",
|
|
39
48
|
"What is a non-compete clause?",
|
|
40
49
|
],
|
|
50
|
+
task="retrieval/query",
|
|
41
51
|
)
|
|
42
52
|
print(embedding_response.embeddings)
|
|
43
53
|
```
|
|
@@ -68,6 +78,7 @@ async def main() -> None:
|
|
|
68
78
|
"Are restraints of trade enforceable under English law?",
|
|
69
79
|
"What is a non-compete clause?",
|
|
70
80
|
],
|
|
81
|
+
task="retrieval/query",
|
|
71
82
|
)
|
|
72
83
|
print(embedding_response.embeddings)
|
|
73
84
|
|
|
@@ -91,6 +102,7 @@ pip install isaacus[aiohttp]
|
|
|
91
102
|
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
|
|
92
103
|
|
|
93
104
|
```python
|
|
105
|
+
import os
|
|
94
106
|
import asyncio
|
|
95
107
|
from isaacus import DefaultAioHttpClient
|
|
96
108
|
from isaacus import AsyncIsaacus
|
|
@@ -98,7 +110,7 @@ from isaacus import AsyncIsaacus
|
|
|
98
110
|
|
|
99
111
|
async def main() -> None:
|
|
100
112
|
async with AsyncIsaacus(
|
|
101
|
-
api_key="
|
|
113
|
+
api_key=os.environ.get("ISAACUS_API_KEY"), # This is the default and can be omitted
|
|
102
114
|
http_client=DefaultAioHttpClient(),
|
|
103
115
|
) as client:
|
|
104
116
|
embedding_response = await client.embeddings.create(
|
|
@@ -107,6 +119,7 @@ async def main() -> None:
|
|
|
107
119
|
"Are restraints of trade enforceable under English law?",
|
|
108
120
|
"What is a non-compete clause?",
|
|
109
121
|
],
|
|
122
|
+
task="retrieval/query",
|
|
110
123
|
)
|
|
111
124
|
print(embedding_response.embeddings)
|
|
112
125
|
|
|
@@ -167,6 +180,7 @@ try:
|
|
|
167
180
|
"Are restraints of trade enforceable under English law?",
|
|
168
181
|
"What is a non-compete clause?",
|
|
169
182
|
],
|
|
183
|
+
task="retrieval/query",
|
|
170
184
|
)
|
|
171
185
|
except isaacus.APIConnectionError as e:
|
|
172
186
|
print("The server could not be reached")
|
|
@@ -216,6 +230,7 @@ client.with_options(max_retries=5).embeddings.create(
|
|
|
216
230
|
"Are restraints of trade enforceable under English law?",
|
|
217
231
|
"What is a non-compete clause?",
|
|
218
232
|
],
|
|
233
|
+
task="retrieval/query",
|
|
219
234
|
)
|
|
220
235
|
```
|
|
221
236
|
|
|
@@ -245,6 +260,7 @@ client.with_options(timeout=5.0).embeddings.create(
|
|
|
245
260
|
"Are restraints of trade enforceable under English law?",
|
|
246
261
|
"What is a non-compete clause?",
|
|
247
262
|
],
|
|
263
|
+
task="retrieval/query",
|
|
248
264
|
)
|
|
249
265
|
```
|
|
250
266
|
|
|
@@ -289,6 +305,7 @@ client = Isaacus()
|
|
|
289
305
|
response = client.embeddings.with_raw_response.create(
|
|
290
306
|
model="kanon-2-embedder",
|
|
291
307
|
texts=["Are restraints of trade enforceable under English law?", "What is a non-compete clause?"],
|
|
308
|
+
task="retrieval/query",
|
|
292
309
|
)
|
|
293
310
|
print(response.headers.get('X-My-Header'))
|
|
294
311
|
|
|
@@ -313,6 +330,7 @@ with client.embeddings.with_streaming_response.create(
|
|
|
313
330
|
"Are restraints of trade enforceable under English law?",
|
|
314
331
|
"What is a non-compete clause?",
|
|
315
332
|
],
|
|
333
|
+
task="retrieval/query",
|
|
316
334
|
) as response:
|
|
317
335
|
print(response.headers.get("X-My-Header"))
|
|
318
336
|
|
|
@@ -423,7 +441,7 @@ print(isaacus.__version__)
|
|
|
423
441
|
|
|
424
442
|
## Requirements
|
|
425
443
|
|
|
426
|
-
Python 3.
|
|
444
|
+
Python 3.9 or higher.
|
|
427
445
|
|
|
428
446
|
## Contributing
|
|
429
447
|
|
|
@@ -49,3 +49,15 @@ from isaacus.types.extractions import AnswerExtractionResponse
|
|
|
49
49
|
Methods:
|
|
50
50
|
|
|
51
51
|
- <code title="post /extractions/qa">client.extractions.qa.<a href="./src/isaacus/resources/extractions/qa.py">create</a>(\*\*<a href="src/isaacus/types/extractions/qa_create_params.py">params</a>) -> <a href="./src/isaacus/types/extractions/answer_extraction_response.py">AnswerExtractionResponse</a></code>
|
|
52
|
+
|
|
53
|
+
# Enrichments
|
|
54
|
+
|
|
55
|
+
Types:
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
from isaacus.types import EnrichmentResponse
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Methods:
|
|
62
|
+
|
|
63
|
+
- <code title="post /enrichments">client.enrichments.<a href="./src/isaacus/resources/enrichments.py">create</a>(\*\*<a href="src/isaacus/types/enrichment_create_params.py">params</a>) -> <a href="./src/isaacus/types/enrichment_response.py">EnrichmentResponse</a></code>
|
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "isaacus"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.10.1"
|
|
4
4
|
description = "The official Python library for the isaacus API"
|
|
5
5
|
dynamic = ["readme"]
|
|
6
6
|
license = "Apache-2.0"
|
|
7
7
|
authors = [
|
|
8
8
|
{ name = "Isaacus", email = "support@isaacus.com" },
|
|
9
9
|
]
|
|
10
|
+
|
|
10
11
|
dependencies = [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
"httpx>=0.23.0, <1",
|
|
13
|
+
"pydantic>=1.9.0, <3",
|
|
14
|
+
"typing-extensions>=4.10, <5",
|
|
15
|
+
"anyio>=3.5.0, <5",
|
|
16
|
+
"distro>=1.7.0, <2",
|
|
17
|
+
"sniffio",
|
|
17
18
|
]
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
requires-python = ">= 3.9"
|
|
19
21
|
classifiers = [
|
|
20
22
|
"Typing :: Typed",
|
|
21
23
|
"Intended Audience :: Developers",
|
|
22
|
-
"Programming Language :: Python :: 3.8",
|
|
23
24
|
"Programming Language :: Python :: 3.9",
|
|
24
25
|
"Programming Language :: Python :: 3.10",
|
|
25
26
|
"Programming Language :: Python :: 3.11",
|
|
26
27
|
"Programming Language :: Python :: 3.12",
|
|
27
28
|
"Programming Language :: Python :: 3.13",
|
|
29
|
+
"Programming Language :: Python :: 3.14",
|
|
28
30
|
"Operating System :: OS Independent",
|
|
29
31
|
"Operating System :: POSIX",
|
|
30
32
|
"Operating System :: MacOS",
|
|
@@ -46,7 +48,7 @@ managed = true
|
|
|
46
48
|
# version pins are in requirements-dev.lock
|
|
47
49
|
dev-dependencies = [
|
|
48
50
|
"pyright==1.1.399",
|
|
49
|
-
"mypy",
|
|
51
|
+
"mypy==1.17",
|
|
50
52
|
"respx",
|
|
51
53
|
"pytest",
|
|
52
54
|
"pytest-asyncio",
|
|
@@ -141,7 +143,7 @@ filterwarnings = [
|
|
|
141
143
|
# there are a couple of flags that are still disabled by
|
|
142
144
|
# default in strict mode as they are experimental and niche.
|
|
143
145
|
typeCheckingMode = "strict"
|
|
144
|
-
pythonVersion = "3.
|
|
146
|
+
pythonVersion = "3.9"
|
|
145
147
|
|
|
146
148
|
exclude = [
|
|
147
149
|
"_dev",
|
|
@@ -12,40 +12,45 @@
|
|
|
12
12
|
-e file:.
|
|
13
13
|
aiohappyeyeballs==2.6.1
|
|
14
14
|
# via aiohttp
|
|
15
|
-
aiohttp==3.
|
|
15
|
+
aiohttp==3.13.2
|
|
16
16
|
# via httpx-aiohttp
|
|
17
17
|
# via isaacus
|
|
18
|
-
aiosignal==1.
|
|
18
|
+
aiosignal==1.4.0
|
|
19
19
|
# via aiohttp
|
|
20
|
-
annotated-types==0.
|
|
20
|
+
annotated-types==0.7.0
|
|
21
21
|
# via pydantic
|
|
22
|
-
anyio==4.
|
|
22
|
+
anyio==4.12.0
|
|
23
23
|
# via httpx
|
|
24
24
|
# via isaacus
|
|
25
|
-
argcomplete==3.
|
|
25
|
+
argcomplete==3.6.3
|
|
26
26
|
# via nox
|
|
27
27
|
async-timeout==5.0.1
|
|
28
28
|
# via aiohttp
|
|
29
|
-
attrs==25.
|
|
29
|
+
attrs==25.4.0
|
|
30
30
|
# via aiohttp
|
|
31
|
-
|
|
31
|
+
# via nox
|
|
32
|
+
backports-asyncio-runner==1.2.0
|
|
33
|
+
# via pytest-asyncio
|
|
34
|
+
certifi==2025.11.12
|
|
32
35
|
# via httpcore
|
|
33
36
|
# via httpx
|
|
34
|
-
colorlog==6.
|
|
37
|
+
colorlog==6.10.1
|
|
38
|
+
# via nox
|
|
39
|
+
dependency-groups==1.3.1
|
|
35
40
|
# via nox
|
|
36
|
-
dirty-equals==0.
|
|
37
|
-
distlib==0.
|
|
41
|
+
dirty-equals==0.11
|
|
42
|
+
distlib==0.4.0
|
|
38
43
|
# via virtualenv
|
|
39
|
-
distro==1.
|
|
44
|
+
distro==1.9.0
|
|
40
45
|
# via isaacus
|
|
41
|
-
exceptiongroup==1.
|
|
46
|
+
exceptiongroup==1.3.1
|
|
42
47
|
# via anyio
|
|
43
48
|
# via pytest
|
|
44
|
-
execnet==2.1.
|
|
49
|
+
execnet==2.1.2
|
|
45
50
|
# via pytest-xdist
|
|
46
|
-
filelock==3.
|
|
51
|
+
filelock==3.19.1
|
|
47
52
|
# via virtualenv
|
|
48
|
-
frozenlist==1.
|
|
53
|
+
frozenlist==1.8.0
|
|
49
54
|
# via aiohttp
|
|
50
55
|
# via aiosignal
|
|
51
56
|
h11==0.16.0
|
|
@@ -58,80 +63,87 @@ httpx==0.28.1
|
|
|
58
63
|
# via respx
|
|
59
64
|
httpx-aiohttp==0.1.9
|
|
60
65
|
# via isaacus
|
|
61
|
-
|
|
66
|
+
humanize==4.13.0
|
|
67
|
+
# via nox
|
|
68
|
+
idna==3.11
|
|
62
69
|
# via anyio
|
|
63
70
|
# via httpx
|
|
64
71
|
# via yarl
|
|
65
|
-
importlib-metadata==7.0
|
|
66
|
-
iniconfig==2.
|
|
72
|
+
importlib-metadata==8.7.0
|
|
73
|
+
iniconfig==2.1.0
|
|
67
74
|
# via pytest
|
|
68
75
|
markdown-it-py==3.0.0
|
|
69
76
|
# via rich
|
|
70
77
|
mdurl==0.1.2
|
|
71
78
|
# via markdown-it-py
|
|
72
|
-
multidict==6.
|
|
79
|
+
multidict==6.7.0
|
|
73
80
|
# via aiohttp
|
|
74
81
|
# via yarl
|
|
75
|
-
mypy==1.
|
|
76
|
-
mypy-extensions==1.
|
|
82
|
+
mypy==1.17.0
|
|
83
|
+
mypy-extensions==1.1.0
|
|
77
84
|
# via mypy
|
|
78
|
-
nodeenv==1.
|
|
85
|
+
nodeenv==1.9.1
|
|
79
86
|
# via pyright
|
|
80
|
-
nox==
|
|
81
|
-
packaging==
|
|
87
|
+
nox==2025.11.12
|
|
88
|
+
packaging==25.0
|
|
89
|
+
# via dependency-groups
|
|
82
90
|
# via nox
|
|
83
91
|
# via pytest
|
|
84
|
-
|
|
92
|
+
pathspec==0.12.1
|
|
93
|
+
# via mypy
|
|
94
|
+
platformdirs==4.4.0
|
|
85
95
|
# via virtualenv
|
|
86
|
-
pluggy==1.
|
|
96
|
+
pluggy==1.6.0
|
|
87
97
|
# via pytest
|
|
88
|
-
propcache==0.
|
|
98
|
+
propcache==0.4.1
|
|
89
99
|
# via aiohttp
|
|
90
100
|
# via yarl
|
|
91
|
-
pydantic==2.
|
|
101
|
+
pydantic==2.12.5
|
|
92
102
|
# via isaacus
|
|
93
|
-
pydantic-core==2.
|
|
103
|
+
pydantic-core==2.41.5
|
|
94
104
|
# via pydantic
|
|
95
|
-
pygments==2.
|
|
105
|
+
pygments==2.19.2
|
|
106
|
+
# via pytest
|
|
96
107
|
# via rich
|
|
97
108
|
pyright==1.1.399
|
|
98
|
-
pytest==8.
|
|
109
|
+
pytest==8.4.2
|
|
99
110
|
# via pytest-asyncio
|
|
100
111
|
# via pytest-xdist
|
|
101
|
-
pytest-asyncio==
|
|
102
|
-
pytest-xdist==3.
|
|
103
|
-
python-dateutil==2.
|
|
112
|
+
pytest-asyncio==1.2.0
|
|
113
|
+
pytest-xdist==3.8.0
|
|
114
|
+
python-dateutil==2.9.0.post0
|
|
104
115
|
# via time-machine
|
|
105
|
-
pytz==2023.3.post1
|
|
106
|
-
# via dirty-equals
|
|
107
116
|
respx==0.22.0
|
|
108
|
-
rich==
|
|
109
|
-
ruff==0.
|
|
110
|
-
|
|
111
|
-
# via nodeenv
|
|
112
|
-
six==1.16.0
|
|
117
|
+
rich==14.2.0
|
|
118
|
+
ruff==0.14.7
|
|
119
|
+
six==1.17.0
|
|
113
120
|
# via python-dateutil
|
|
114
|
-
sniffio==1.3.
|
|
115
|
-
# via anyio
|
|
121
|
+
sniffio==1.3.1
|
|
116
122
|
# via isaacus
|
|
117
|
-
time-machine==2.
|
|
118
|
-
tomli==2.0
|
|
123
|
+
time-machine==2.19.0
|
|
124
|
+
tomli==2.3.0
|
|
125
|
+
# via dependency-groups
|
|
119
126
|
# via mypy
|
|
127
|
+
# via nox
|
|
120
128
|
# via pytest
|
|
121
|
-
typing-extensions==4.
|
|
129
|
+
typing-extensions==4.15.0
|
|
130
|
+
# via aiosignal
|
|
122
131
|
# via anyio
|
|
132
|
+
# via exceptiongroup
|
|
123
133
|
# via isaacus
|
|
124
134
|
# via multidict
|
|
125
135
|
# via mypy
|
|
126
136
|
# via pydantic
|
|
127
137
|
# via pydantic-core
|
|
128
138
|
# via pyright
|
|
139
|
+
# via pytest-asyncio
|
|
129
140
|
# via typing-inspection
|
|
130
|
-
|
|
141
|
+
# via virtualenv
|
|
142
|
+
typing-inspection==0.4.2
|
|
131
143
|
# via pydantic
|
|
132
|
-
virtualenv==20.
|
|
144
|
+
virtualenv==20.35.4
|
|
133
145
|
# via nox
|
|
134
|
-
yarl==1.
|
|
146
|
+
yarl==1.22.0
|
|
135
147
|
# via aiohttp
|
|
136
|
-
zipp==3.
|
|
148
|
+
zipp==3.23.0
|
|
137
149
|
# via importlib-metadata
|
|
@@ -12,28 +12,28 @@
|
|
|
12
12
|
-e file:.
|
|
13
13
|
aiohappyeyeballs==2.6.1
|
|
14
14
|
# via aiohttp
|
|
15
|
-
aiohttp==3.
|
|
15
|
+
aiohttp==3.13.2
|
|
16
16
|
# via httpx-aiohttp
|
|
17
17
|
# via isaacus
|
|
18
|
-
aiosignal==1.
|
|
18
|
+
aiosignal==1.4.0
|
|
19
19
|
# via aiohttp
|
|
20
|
-
annotated-types==0.
|
|
20
|
+
annotated-types==0.7.0
|
|
21
21
|
# via pydantic
|
|
22
|
-
anyio==4.
|
|
22
|
+
anyio==4.12.0
|
|
23
23
|
# via httpx
|
|
24
24
|
# via isaacus
|
|
25
25
|
async-timeout==5.0.1
|
|
26
26
|
# via aiohttp
|
|
27
|
-
attrs==25.
|
|
27
|
+
attrs==25.4.0
|
|
28
28
|
# via aiohttp
|
|
29
|
-
certifi==
|
|
29
|
+
certifi==2025.11.12
|
|
30
30
|
# via httpcore
|
|
31
31
|
# via httpx
|
|
32
|
-
distro==1.
|
|
32
|
+
distro==1.9.0
|
|
33
33
|
# via isaacus
|
|
34
|
-
exceptiongroup==1.
|
|
34
|
+
exceptiongroup==1.3.1
|
|
35
35
|
# via anyio
|
|
36
|
-
frozenlist==1.
|
|
36
|
+
frozenlist==1.8.0
|
|
37
37
|
# via aiohttp
|
|
38
38
|
# via aiosignal
|
|
39
39
|
h11==0.16.0
|
|
@@ -45,31 +45,32 @@ httpx==0.28.1
|
|
|
45
45
|
# via isaacus
|
|
46
46
|
httpx-aiohttp==0.1.9
|
|
47
47
|
# via isaacus
|
|
48
|
-
idna==3.
|
|
48
|
+
idna==3.11
|
|
49
49
|
# via anyio
|
|
50
50
|
# via httpx
|
|
51
51
|
# via yarl
|
|
52
|
-
multidict==6.
|
|
52
|
+
multidict==6.7.0
|
|
53
53
|
# via aiohttp
|
|
54
54
|
# via yarl
|
|
55
|
-
propcache==0.
|
|
55
|
+
propcache==0.4.1
|
|
56
56
|
# via aiohttp
|
|
57
57
|
# via yarl
|
|
58
|
-
pydantic==2.
|
|
58
|
+
pydantic==2.12.5
|
|
59
59
|
# via isaacus
|
|
60
|
-
pydantic-core==2.
|
|
60
|
+
pydantic-core==2.41.5
|
|
61
61
|
# via pydantic
|
|
62
|
-
sniffio==1.3.
|
|
63
|
-
# via anyio
|
|
62
|
+
sniffio==1.3.1
|
|
64
63
|
# via isaacus
|
|
65
|
-
typing-extensions==4.
|
|
64
|
+
typing-extensions==4.15.0
|
|
65
|
+
# via aiosignal
|
|
66
66
|
# via anyio
|
|
67
|
+
# via exceptiongroup
|
|
67
68
|
# via isaacus
|
|
68
69
|
# via multidict
|
|
69
70
|
# via pydantic
|
|
70
71
|
# via pydantic-core
|
|
71
72
|
# via typing-inspection
|
|
72
|
-
typing-inspection==0.4.
|
|
73
|
+
typing-inspection==0.4.2
|
|
73
74
|
# via pydantic
|
|
74
|
-
yarl==1.
|
|
75
|
+
yarl==1.22.0
|
|
75
76
|
# via aiohttp
|