isaacus 0.6.0__tar.gz → 0.6.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.6.1/.release-please-manifest.json +3 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/CHANGELOG.md +21 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/PKG-INFO +2 -2
- {isaacus-0.6.0 → isaacus-0.6.1}/README.md +1 -1
- {isaacus-0.6.0 → isaacus-0.6.1}/pyproject.toml +1 -1
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/__init__.py +5 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_proxy.py +4 -1
- isaacus-0.6.1/src/isaacus/_utils/_resources_proxy.py +24 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_version.py +1 -1
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/extractions/answer_extraction.py +2 -1
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_utils/test_proxy.py +11 -0
- isaacus-0.6.0/.release-please-manifest.json +0 -3
- {isaacus-0.6.0 → isaacus-0.6.1}/.gitignore +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/CONTRIBUTING.md +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/LICENSE +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/SECURITY.md +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/api.md +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/bin/check-release-environment +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/bin/publish-pypi +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/examples/.keep +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/mypy.ini +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/noxfile.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/release-please-config.json +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/requirements-dev.lock +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/requirements.lock +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_base_client.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_client.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_compat.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_constants.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_exceptions.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_files.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_models.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_qs.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_resource.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_response.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_streaming.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_types.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/__init__.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_logs.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_reflection.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_streams.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_sync.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_transform.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_typing.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_utils.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/lib/.keep +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/py.typed +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/__init__.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/classifications/__init__.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/classifications/classifications.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/classifications/universal.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/extractions/__init__.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/extractions/extractions.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/extractions/qa.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/rerankings.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/__init__.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/classifications/__init__.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/classifications/universal_classification.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/classifications/universal_create_params.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/extractions/__init__.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/extractions/qa_create_params.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/reranking.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/reranking_create_params.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/__init__.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/api_resources/__init__.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/api_resources/classifications/__init__.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/api_resources/classifications/test_universal.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/api_resources/extractions/__init__.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/api_resources/extractions/test_qa.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/api_resources/test_rerankings.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/conftest.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/sample_file.txt +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_client.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_deepcopy.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_extract_files.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_files.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_models.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_qs.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_required_args.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_response.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_streaming.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_transform.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_utils/test_typing.py +0 -0
- {isaacus-0.6.0 → isaacus-0.6.1}/tests/utils.py +0 -0
@@ -1,5 +1,26 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.6.1 (2025-05-10)
|
4
|
+
|
5
|
+
Full Changelog: [v0.6.0...v0.6.1](https://github.com/isaacus-dev/isaacus-python/compare/v0.6.0...v0.6.1)
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
* **client:** fix bug where types occasionally wouldn't generate ([e1bec40](https://github.com/isaacus-dev/isaacus-python/commit/e1bec4066b30cfefa004cdddc620c4c8131bd0de))
|
10
|
+
* **package:** support direct resource imports ([46ada4d](https://github.com/isaacus-dev/isaacus-python/commit/46ada4d158767a9dc03f19222009a853c5626cc7))
|
11
|
+
|
12
|
+
|
13
|
+
### Chores
|
14
|
+
|
15
|
+
* **internal:** avoid errors for isinstance checks on proxies ([e4ffb62](https://github.com/isaacus-dev/isaacus-python/commit/e4ffb62a053ec88a60667a8a1e149a15d5f61a86))
|
16
|
+
* **internal:** codegen related update ([ed8951f](https://github.com/isaacus-dev/isaacus-python/commit/ed8951f3943af3be84ea11a363e6ac3c23e37b2b))
|
17
|
+
|
18
|
+
|
19
|
+
### Documentation
|
20
|
+
|
21
|
+
* **api:** fixed incorrect description of how extraction results are ordered ([4c6ee63](https://github.com/isaacus-dev/isaacus-python/commit/4c6ee63ab3b274ee76cb56f526004f2f63dbb0ac))
|
22
|
+
* remove or fix invalid readme examples ([71a39ed](https://github.com/isaacus-dev/isaacus-python/commit/71a39ed2e5608d44fec4c1c5d83f97af6eaa4527))
|
23
|
+
|
3
24
|
## 0.6.0 (2025-04-30)
|
4
25
|
|
5
26
|
Full Changelog: [v0.5.0...v0.6.0](https://github.com/isaacus-dev/isaacus-python/compare/v0.5.0...v0.6.0)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: isaacus
|
3
|
-
Version: 0.6.
|
3
|
+
Version: 0.6.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
|
@@ -131,7 +131,7 @@ universal_classification = client.classifications.universal.create(
|
|
131
131
|
"size": 512,
|
132
132
|
},
|
133
133
|
)
|
134
|
-
print(universal_classification.
|
134
|
+
print(universal_classification.classifications)
|
135
135
|
```
|
136
136
|
|
137
137
|
## Handling errors
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
2
|
|
3
|
+
import typing as _t
|
4
|
+
|
3
5
|
from . import types
|
4
6
|
from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes
|
5
7
|
from ._utils import file_from_path
|
@@ -68,6 +70,9 @@ __all__ = [
|
|
68
70
|
"DefaultAsyncHttpxClient",
|
69
71
|
]
|
70
72
|
|
73
|
+
if not _t.TYPE_CHECKING:
|
74
|
+
from ._utils._resources_proxy import resources as resources
|
75
|
+
|
71
76
|
_setup_logging()
|
72
77
|
|
73
78
|
# Update the __module__ attribute for exported symbols so that
|
@@ -46,7 +46,10 @@ class LazyProxy(Generic[T], ABC):
|
|
46
46
|
@property # type: ignore
|
47
47
|
@override
|
48
48
|
def __class__(self) -> type: # pyright: ignore
|
49
|
-
|
49
|
+
try:
|
50
|
+
proxied = self.__get_proxied__()
|
51
|
+
except Exception:
|
52
|
+
return type(self)
|
50
53
|
if issubclass(type(proxied), LazyProxy):
|
51
54
|
return type(proxied)
|
52
55
|
return proxied.__class__
|
@@ -0,0 +1,24 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
from typing import Any
|
4
|
+
from typing_extensions import override
|
5
|
+
|
6
|
+
from ._proxy import LazyProxy
|
7
|
+
|
8
|
+
|
9
|
+
class ResourcesProxy(LazyProxy[Any]):
|
10
|
+
"""A proxy for the `isaacus.resources` module.
|
11
|
+
|
12
|
+
This is used so that we can lazily import `isaacus.resources` only when
|
13
|
+
needed *and* so that users can just import `isaacus` and reference `isaacus.resources`
|
14
|
+
"""
|
15
|
+
|
16
|
+
@override
|
17
|
+
def __load__(self) -> Any:
|
18
|
+
import importlib
|
19
|
+
|
20
|
+
mod = importlib.import_module("isaacus.resources")
|
21
|
+
return mod
|
22
|
+
|
23
|
+
|
24
|
+
resources = ResourcesProxy().__as_proxied__()
|
@@ -61,7 +61,8 @@ class AnswerExtraction(BaseModel):
|
|
61
61
|
extractions: List[Extraction]
|
62
62
|
"""
|
63
63
|
The results of extracting answers from the texts, ordered from highest to lowest
|
64
|
-
inextractability score
|
64
|
+
answer confidence score (or else lowest to highest inextractability score if
|
65
|
+
there are no answers for a text).
|
65
66
|
"""
|
66
67
|
|
67
68
|
usage: Usage
|
@@ -21,3 +21,14 @@ def test_recursive_proxy() -> None:
|
|
21
21
|
assert dir(proxy) == []
|
22
22
|
assert type(proxy).__name__ == "RecursiveLazyProxy"
|
23
23
|
assert type(operator.attrgetter("name.foo.bar.baz")(proxy)).__name__ == "RecursiveLazyProxy"
|
24
|
+
|
25
|
+
|
26
|
+
def test_isinstance_does_not_error() -> None:
|
27
|
+
class AlwaysErrorProxy(LazyProxy[Any]):
|
28
|
+
@override
|
29
|
+
def __load__(self) -> Any:
|
30
|
+
raise RuntimeError("Mocking missing dependency")
|
31
|
+
|
32
|
+
proxy = AlwaysErrorProxy()
|
33
|
+
assert not isinstance(proxy, dict)
|
34
|
+
assert isinstance(proxy, LazyProxy)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/classifications/universal_classification.py
RENAMED
File without changes
|
{isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/classifications/universal_create_params.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|