reflectapi-runtime 0.17.6__tar.gz → 0.19.0__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 (36) hide show
  1. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/PKG-INFO +13 -6
  2. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/README.md +9 -4
  3. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/pyproject.toml +3 -1
  4. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/__init__.py +4 -2
  5. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/client.py +370 -274
  6. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/exceptions.py +10 -2
  7. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/response.py +100 -6
  8. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/transport.py +6 -1
  9. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_client.py +402 -1
  10. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_sse.py +50 -1
  11. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/.gitignore +0 -0
  12. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/auth.py +0 -0
  13. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/batch.py +0 -0
  14. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/duration.py +0 -0
  15. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/hypothesis_strategies.py +0 -0
  16. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/middleware.py +0 -0
  17. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/partial.py +0 -0
  18. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/serde.py +0 -0
  19. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/sse.py +0 -0
  20. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/streaming.py +0 -0
  21. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/testing.py +0 -0
  22. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/src/reflectapi_runtime/types.py +0 -0
  23. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/__init__.py +0 -0
  24. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_auth.py +0 -0
  25. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_auth_negative_cases.py +0 -0
  26. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_batch.py +0 -0
  27. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_codegen_regressions.py +0 -0
  28. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_edge_cases.py +0 -0
  29. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_enhanced_features.py +0 -0
  30. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_exceptions.py +0 -0
  31. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_middleware.py +0 -0
  32. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_partial.py +0 -0
  33. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_pydantic_serialization.py +0 -0
  34. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_response.py +0 -0
  35. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_streaming.py +0 -0
  36. {reflectapi_runtime-0.17.6 → reflectapi_runtime-0.19.0}/tests/test_testing.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: reflectapi-runtime
3
- Version: 0.17.6
3
+ Version: 0.19.0
4
4
  Summary: Runtime library for ReflectAPI Python clients
5
5
  Project-URL: Homepage, https://github.com/thepartly/reflectapi
6
6
  Project-URL: Repository, https://github.com/thepartly/reflectapi
@@ -14,12 +14,14 @@ Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: Programming Language :: Python :: 3
15
15
  Classifier: Programming Language :: Python :: 3.12
16
16
  Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
17
18
  Classifier: Topic :: Internet :: WWW/HTTP
18
19
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
20
  Classifier: Typing :: Typed
20
21
  Requires-Python: >=3.12
21
22
  Requires-Dist: httpx>=0.25.0
22
23
  Requires-Dist: pydantic>=2.0.0
24
+ Requires-Dist: typing-extensions>=4.4.0
23
25
  Provides-Extra: dev
24
26
  Requires-Dist: hypothesis>=6.0.0; extra == 'dev'
25
27
  Requires-Dist: mypy>=1.5.0; extra == 'dev'
@@ -45,13 +47,18 @@ directly.
45
47
  - `ClientBase` / `AsyncClientBase` — base classes used by the generated
46
48
  `Client` / `AsyncClient`. They wrap `httpx` and handle request build-up,
47
49
  Pydantic-based response validation, and middleware.
48
- - `ApiResponse[T, E]` — typed wrapper around the response value, transport
49
- metadata, and the optional typed error.
50
+ - `ApiResponse[T, E, H]` — typed wrapper around the response value, transport
51
+ metadata, the optional typed error, and the API's declared response headers
52
+ (`.headers`).
53
+ - `ApiStream[T, H]` / `AsyncApiStream[T, H]` — iterators returned by streaming
54
+ methods, exposing the response's `metadata` and declared `headers` once
55
+ iteration starts.
50
56
  - `ApplicationError`, `NetworkError`, `TimeoutError`, `ValidationError` —
51
57
  exceptions raised by the generated methods on non-2xx, transport, and
52
58
  validation failures respectively.
53
- - `ReflectapiOption` — three-state Option used by the generated models
54
- (`some` / `none` / `undefined`) so absent and explicit-null can round-trip.
59
+ - `ReflectapiPartialModel` — base class for generated models with three-state
60
+ fields (value / explicit-null / absent) so absent and explicit-null can
61
+ round-trip, tracked via Pydantic's `model_fields_set`.
55
62
  - Authentication helpers (`BearerTokenAuth`, `APIKeyAuth`, `BasicAuth`,
56
63
  `OAuth2ClientCredentialsAuth`, `OAuth2AuthorizationCodeAuth`).
57
64
  - Middleware, batching, and testing utilities (`MockClient`,
@@ -10,13 +10,18 @@ directly.
10
10
  - `ClientBase` / `AsyncClientBase` — base classes used by the generated
11
11
  `Client` / `AsyncClient`. They wrap `httpx` and handle request build-up,
12
12
  Pydantic-based response validation, and middleware.
13
- - `ApiResponse[T, E]` — typed wrapper around the response value, transport
14
- metadata, and the optional typed error.
13
+ - `ApiResponse[T, E, H]` — typed wrapper around the response value, transport
14
+ metadata, the optional typed error, and the API's declared response headers
15
+ (`.headers`).
16
+ - `ApiStream[T, H]` / `AsyncApiStream[T, H]` — iterators returned by streaming
17
+ methods, exposing the response's `metadata` and declared `headers` once
18
+ iteration starts.
15
19
  - `ApplicationError`, `NetworkError`, `TimeoutError`, `ValidationError` —
16
20
  exceptions raised by the generated methods on non-2xx, transport, and
17
21
  validation failures respectively.
18
- - `ReflectapiOption` — three-state Option used by the generated models
19
- (`some` / `none` / `undefined`) so absent and explicit-null can round-trip.
22
+ - `ReflectapiPartialModel` — base class for generated models with three-state
23
+ fields (value / explicit-null / absent) so absent and explicit-null can
24
+ round-trip, tracked via Pydantic's `model_fields_set`.
20
25
  - Authentication helpers (`BearerTokenAuth`, `APIKeyAuth`, `BasicAuth`,
21
26
  `OAuth2ClientCredentialsAuth`, `OAuth2AuthorizationCodeAuth`).
22
27
  - Middleware, batching, and testing utilities (`MockClient`,
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "reflectapi-runtime"
7
- version = "0.17.6"
7
+ version = "0.19.0"
8
8
  description = "Runtime library for ReflectAPI Python clients"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -20,6 +20,7 @@ classifiers = [
20
20
  "Programming Language :: Python :: 3",
21
21
  "Programming Language :: Python :: 3.12",
22
22
  "Programming Language :: Python :: 3.13",
23
+ "Programming Language :: Python :: 3.14",
23
24
  "Topic :: Internet :: WWW/HTTP",
24
25
  "Topic :: Software Development :: Libraries :: Python Modules",
25
26
  "Typing :: Typed",
@@ -27,6 +28,7 @@ classifiers = [
27
28
  dependencies = [
28
29
  "pydantic>=2.0.0",
29
30
  "httpx>=0.25.0",
31
+ "typing-extensions>=4.4.0",
30
32
  ]
31
33
 
32
34
  [project.optional-dependencies]
@@ -38,7 +38,7 @@ from .hypothesis_strategies import (
38
38
  )
39
39
  from .middleware import AsyncMiddleware
40
40
  from .partial import ReflectapiPartialModel
41
- from .response import ApiResponse, TransportMetadata
41
+ from .response import ApiResponse, ApiStream, AsyncApiStream, TransportMetadata
42
42
  from .serde import parse_externally_tagged, serialize_externally_tagged
43
43
  from .streaming import AsyncStreamingClient, StreamingResponse
44
44
  from .testing import (
@@ -50,7 +50,7 @@ from .testing import (
50
50
  )
51
51
  from .types import BatchResult, ReflectapiEmpty, ReflectapiInfallible
52
52
 
53
- __version__ = "0.17.6"
53
+ __version__ = "0.19.0"
54
54
 
55
55
  __all__ = [
56
56
  # Authentication
@@ -94,6 +94,8 @@ __all__ = [
94
94
  "parse_externally_tagged",
95
95
  "serialize_externally_tagged",
96
96
  "StreamingResponse",
97
+ "ApiStream",
98
+ "AsyncApiStream",
97
99
  "TestClientMixin",
98
100
  "TimeoutError",
99
101
  "TransportMetadata",