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.
Files changed (84) hide show
  1. isaacus-0.6.1/.release-please-manifest.json +3 -0
  2. {isaacus-0.6.0 → isaacus-0.6.1}/CHANGELOG.md +21 -0
  3. {isaacus-0.6.0 → isaacus-0.6.1}/PKG-INFO +2 -2
  4. {isaacus-0.6.0 → isaacus-0.6.1}/README.md +1 -1
  5. {isaacus-0.6.0 → isaacus-0.6.1}/pyproject.toml +1 -1
  6. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/__init__.py +5 -0
  7. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_proxy.py +4 -1
  8. isaacus-0.6.1/src/isaacus/_utils/_resources_proxy.py +24 -0
  9. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_version.py +1 -1
  10. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/extractions/answer_extraction.py +2 -1
  11. {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_utils/test_proxy.py +11 -0
  12. isaacus-0.6.0/.release-please-manifest.json +0 -3
  13. {isaacus-0.6.0 → isaacus-0.6.1}/.gitignore +0 -0
  14. {isaacus-0.6.0 → isaacus-0.6.1}/CONTRIBUTING.md +0 -0
  15. {isaacus-0.6.0 → isaacus-0.6.1}/LICENSE +0 -0
  16. {isaacus-0.6.0 → isaacus-0.6.1}/SECURITY.md +0 -0
  17. {isaacus-0.6.0 → isaacus-0.6.1}/api.md +0 -0
  18. {isaacus-0.6.0 → isaacus-0.6.1}/bin/check-release-environment +0 -0
  19. {isaacus-0.6.0 → isaacus-0.6.1}/bin/publish-pypi +0 -0
  20. {isaacus-0.6.0 → isaacus-0.6.1}/examples/.keep +0 -0
  21. {isaacus-0.6.0 → isaacus-0.6.1}/mypy.ini +0 -0
  22. {isaacus-0.6.0 → isaacus-0.6.1}/noxfile.py +0 -0
  23. {isaacus-0.6.0 → isaacus-0.6.1}/release-please-config.json +0 -0
  24. {isaacus-0.6.0 → isaacus-0.6.1}/requirements-dev.lock +0 -0
  25. {isaacus-0.6.0 → isaacus-0.6.1}/requirements.lock +0 -0
  26. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_base_client.py +0 -0
  27. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_client.py +0 -0
  28. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_compat.py +0 -0
  29. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_constants.py +0 -0
  30. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_exceptions.py +0 -0
  31. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_files.py +0 -0
  32. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_models.py +0 -0
  33. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_qs.py +0 -0
  34. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_resource.py +0 -0
  35. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_response.py +0 -0
  36. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_streaming.py +0 -0
  37. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_types.py +0 -0
  38. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/__init__.py +0 -0
  39. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_logs.py +0 -0
  40. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_reflection.py +0 -0
  41. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_streams.py +0 -0
  42. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_sync.py +0 -0
  43. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_transform.py +0 -0
  44. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_typing.py +0 -0
  45. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/_utils/_utils.py +0 -0
  46. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/lib/.keep +0 -0
  47. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/py.typed +0 -0
  48. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/__init__.py +0 -0
  49. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/classifications/__init__.py +0 -0
  50. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/classifications/classifications.py +0 -0
  51. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/classifications/universal.py +0 -0
  52. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/extractions/__init__.py +0 -0
  53. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/extractions/extractions.py +0 -0
  54. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/extractions/qa.py +0 -0
  55. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/resources/rerankings.py +0 -0
  56. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/__init__.py +0 -0
  57. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/classifications/__init__.py +0 -0
  58. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/classifications/universal_classification.py +0 -0
  59. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/classifications/universal_create_params.py +0 -0
  60. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/extractions/__init__.py +0 -0
  61. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/extractions/qa_create_params.py +0 -0
  62. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/reranking.py +0 -0
  63. {isaacus-0.6.0 → isaacus-0.6.1}/src/isaacus/types/reranking_create_params.py +0 -0
  64. {isaacus-0.6.0 → isaacus-0.6.1}/tests/__init__.py +0 -0
  65. {isaacus-0.6.0 → isaacus-0.6.1}/tests/api_resources/__init__.py +0 -0
  66. {isaacus-0.6.0 → isaacus-0.6.1}/tests/api_resources/classifications/__init__.py +0 -0
  67. {isaacus-0.6.0 → isaacus-0.6.1}/tests/api_resources/classifications/test_universal.py +0 -0
  68. {isaacus-0.6.0 → isaacus-0.6.1}/tests/api_resources/extractions/__init__.py +0 -0
  69. {isaacus-0.6.0 → isaacus-0.6.1}/tests/api_resources/extractions/test_qa.py +0 -0
  70. {isaacus-0.6.0 → isaacus-0.6.1}/tests/api_resources/test_rerankings.py +0 -0
  71. {isaacus-0.6.0 → isaacus-0.6.1}/tests/conftest.py +0 -0
  72. {isaacus-0.6.0 → isaacus-0.6.1}/tests/sample_file.txt +0 -0
  73. {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_client.py +0 -0
  74. {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_deepcopy.py +0 -0
  75. {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_extract_files.py +0 -0
  76. {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_files.py +0 -0
  77. {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_models.py +0 -0
  78. {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_qs.py +0 -0
  79. {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_required_args.py +0 -0
  80. {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_response.py +0 -0
  81. {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_streaming.py +0 -0
  82. {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_transform.py +0 -0
  83. {isaacus-0.6.0 → isaacus-0.6.1}/tests/test_utils/test_typing.py +0 -0
  84. {isaacus-0.6.0 → isaacus-0.6.1}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.6.1"
3
+ }
@@ -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.0
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.chunking_options)
134
+ print(universal_classification.classifications)
135
135
  ```
136
136
 
137
137
  ## Handling errors
@@ -100,7 +100,7 @@ universal_classification = client.classifications.universal.create(
100
100
  "size": 512,
101
101
  },
102
102
  )
103
- print(universal_classification.chunking_options)
103
+ print(universal_classification.classifications)
104
104
  ```
105
105
 
106
106
  ## Handling errors
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "isaacus"
3
- version = "0.6.0"
3
+ version = "0.6.1"
4
4
  description = "The official Python library for the isaacus API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -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
- proxied = self.__get_proxied__()
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__()
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "isaacus"
4
- __version__ = "0.6.0" # x-release-please-version
4
+ __version__ = "0.6.1" # x-release-please-version
@@ -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)
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.6.0"
3
- }
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