capo-sagemaker-runtime-http2 0.8.0__tar.gz → 0.9.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 (56) hide show
  1. {capo_sagemaker_runtime_http2-0.8.0/src/capo_sagemaker_runtime_http2.egg-info → capo_sagemaker_runtime_http2-0.9.0}/PKG-INFO +10 -2
  2. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/README.md +5 -1
  3. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/pyproject.toml +7 -1
  4. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/__init__.py +6 -0
  5. capo_sagemaker_runtime_http2-0.9.0/src/capo_sagemaker_runtime_http2/types/_unknown.py +34 -0
  6. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/types/request_stream_event.py +8 -1
  7. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/types/response_stream_event.py +8 -0
  8. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0/src/capo_sagemaker_runtime_http2.egg-info}/PKG-INFO +10 -2
  9. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2.egg-info/SOURCES.txt +1 -0
  10. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/LICENSE +0 -0
  11. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/setup.cfg +0 -0
  12. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_async.py +0 -0
  13. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_auth/_identity.py +0 -0
  14. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_auth/_providers.py +0 -0
  15. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_auth/_signers.py +0 -0
  16. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_auth/_sigv4.py +0 -0
  17. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_auth/_zapros_handler.py +0 -0
  18. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_aws.py +0 -0
  19. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_body.py +0 -0
  20. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_iter.py +0 -0
  21. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_operations/amazon_sage_maker_runtime_http2/invoke_endpoint_with_bidirectional_stream.py +0 -0
  22. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_pagination.py +0 -0
  23. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_protocol/__init__.py +0 -0
  24. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_protocol/errors.py +0 -0
  25. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_protocol/eventstream.py +0 -0
  26. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_protocol/serialize.py +0 -0
  27. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_protocol/xml.py +0 -0
  28. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_rule_engine/__init__.py +0 -0
  29. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_rule_engine/_aws_partition.py +0 -0
  30. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_rule_engine/_endpoint_rule_set.py +0 -0
  31. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_rule_engine/_endpoint_runtime.py +0 -0
  32. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_services/_aws_config.py +0 -0
  33. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_services/_pipeline.py +0 -0
  34. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_services/async_sage_maker_runtime_http2.py +0 -0
  35. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/_services/sage_maker_runtime_http2.py +0 -0
  36. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/errors/__init__.py +0 -0
  37. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/errors/_base.py +0 -0
  38. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/errors/input_validation_error.py +0 -0
  39. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/errors/internal_server_error.py +0 -0
  40. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/errors/internal_stream_failure.py +0 -0
  41. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/errors/model_error.py +0 -0
  42. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/errors/model_stream_error.py +0 -0
  43. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/errors/service_unavailable_error.py +0 -0
  44. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/py.typed +0 -0
  45. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/types/_prelude/blob.py +0 -0
  46. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/types/_prelude/timestamp.py +0 -0
  47. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/types/invoke_endpoint_with_bidirectional_stream_input.py +0 -0
  48. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/types/invoke_endpoint_with_bidirectional_stream_output.py +0 -0
  49. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/types/request_payload_part.py +0 -0
  50. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/types/response_payload_part.py +0 -0
  51. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2/types/sensitive_blob.py +0 -0
  52. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2.egg-info/dependency_links.txt +0 -0
  53. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2.egg-info/requires.txt +0 -0
  54. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/src/capo_sagemaker_runtime_http2.egg-info/top_level.txt +0 -0
  55. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/tests/test_body.py +0 -0
  56. {capo_sagemaker_runtime_http2-0.8.0 → capo_sagemaker_runtime_http2-0.9.0}/tests/test_sigv4.py +0 -0
@@ -1,7 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: capo-sagemaker-runtime-http2
3
- Version: 0.8.0
3
+ Version: 0.9.0
4
4
  Summary: Python SDK for AWS Sagemaker Runtime Http2.
5
+ Project-URL: Homepage, https://capo-sdk.dev/
6
+ Project-URL: Documentation, https://capo-sdk.dev/services/sagemaker-runtime-http2/
7
+ Project-URL: Repository, https://github.com/kap-sh/capo/tree/main/services/sagemaker-runtime-http2
8
+ Project-URL: Changelog, https://github.com/kap-sh/capo/blob/main/services/sagemaker-runtime-http2/CHANGELOG.md
5
9
  Classifier: Development Status :: 4 - Beta
6
10
  Classifier: Intended Audience :: Developers
7
11
  Classifier: License :: OSI Approved :: MIT License
@@ -26,7 +30,11 @@ Requires-Dist: capo-sso-oidc>=0.2.0; extra == "sso"
26
30
  Requires-Dist: capo-sts>=0.3.0; extra == "sso"
27
31
  Dynamic: license-file
28
32
 
29
- # Getting Started
33
+ # capo-sagemaker-runtime-http2: typed, async Python SDK for AWS Sagemaker Runtime Http2
34
+
35
+ `capo-sagemaker-runtime-http2` is a typed Python SDK for AWS Sagemaker Runtime Http2. It has an async client, `AsyncSageMakerRuntimeHTTP2Client`, for asyncio and trio, and a sync client, `SageMakerRuntimeHTTP2Client`, with the same methods. Requests and responses are typed with TypedDicts, so your editor and type checker know every field.
36
+
37
+ It is part of [capo](https://capo-sdk.dev/), a community-driven alternative to boto3 and aioboto3, built on its own HTTP stack instead of botocore and generated from the official AWS Smithy models. Documentation: [https://capo-sdk.dev/services/sagemaker-runtime-http2/](https://capo-sdk.dev/services/sagemaker-runtime-http2/)
30
38
 
31
39
  ## Installation
32
40
 
@@ -1,4 +1,8 @@
1
- # Getting Started
1
+ # capo-sagemaker-runtime-http2: typed, async Python SDK for AWS Sagemaker Runtime Http2
2
+
3
+ `capo-sagemaker-runtime-http2` is a typed Python SDK for AWS Sagemaker Runtime Http2. It has an async client, `AsyncSageMakerRuntimeHTTP2Client`, for asyncio and trio, and a sync client, `SageMakerRuntimeHTTP2Client`, with the same methods. Requests and responses are typed with TypedDicts, so your editor and type checker know every field.
4
+
5
+ It is part of [capo](https://capo-sdk.dev/), a community-driven alternative to boto3 and aioboto3, built on its own HTTP stack instead of botocore and generated from the official AWS Smithy models. Documentation: [https://capo-sdk.dev/services/sagemaker-runtime-http2/](https://capo-sdk.dev/services/sagemaker-runtime-http2/)
2
6
 
3
7
  ## Installation
4
8
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "capo-sagemaker-runtime-http2"
3
- version = "0.8.0"
3
+ version = "0.9.0"
4
4
  description = "Python SDK for AWS Sagemaker Runtime Http2."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -22,6 +22,12 @@ dependencies = [
22
22
  "zapros>=0.21.0",
23
23
  ]
24
24
 
25
+ [project.urls]
26
+ Homepage = "https://capo-sdk.dev/"
27
+ Documentation = "https://capo-sdk.dev/services/sagemaker-runtime-http2/"
28
+ Repository = "https://github.com/kap-sh/capo/tree/main/services/sagemaker-runtime-http2"
29
+ Changelog = "https://github.com/kap-sh/capo/blob/main/services/sagemaker-runtime-http2/CHANGELOG.md"
30
+
25
31
  [project.optional-dependencies]
26
32
  # Async file request bodies via Body.async_from_path
27
33
  anyio = ["anyio>=3.0"]
@@ -79,3 +79,9 @@ from ._services.async_sage_maker_runtime_http2 import (
79
79
  from ._services.sage_maker_runtime_http2 import (
80
80
  SageMakerRuntimeHTTP2Client as SageMakerRuntimeHTTP2Client,
81
81
  )
82
+ from .types._unknown import (
83
+ UnknownEvent as UnknownEvent,
84
+ )
85
+ from .types._unknown import (
86
+ UnknownUnionMember as UnknownUnionMember,
87
+ )
@@ -0,0 +1,34 @@
1
+ """Stand-ins for union variants and events this client doesn't know about.
2
+
3
+ A service may add a union member or an event after the client was generated.
4
+ Smithy asks clients not to fail on those, so deserialization returns one of
5
+ these instead of raising.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from dataclasses import dataclass
11
+
12
+ from .._protocol.eventstream import Message
13
+
14
+
15
+ @dataclass(frozen=True)
16
+ class UnknownUnionMember:
17
+ """A union variant the service sent that this client has no member for."""
18
+
19
+ name: str
20
+ """The variant's name on the wire."""
21
+
22
+
23
+ @dataclass(frozen=True)
24
+ class UnknownEvent:
25
+ """An event-stream event whose ``:event-type`` this client doesn't know."""
26
+
27
+ event_type: str
28
+ """The event's ``:event-type`` header."""
29
+
30
+ message: Message
31
+ """The raw message, headers and undecoded payload."""
32
+
33
+
34
+ __all__ = ["UnknownEvent", "UnknownUnionMember"]
@@ -10,6 +10,7 @@ from capo_sagemaker_runtime_http2._protocol.eventstream import Message
10
10
  from capo_sagemaker_runtime_http2.errors import (
11
11
  UnknownServiceError,
12
12
  )
13
+ from capo_sagemaker_runtime_http2.types._unknown import UnknownEvent
13
14
 
14
15
  if TYPE_CHECKING:
15
16
  import capo_sagemaker_runtime_http2.types.request_payload_part
@@ -21,11 +22,15 @@ class _RequestStreamEvent_PayloadPart(TypedDict, closed=True):
21
22
  )
22
23
 
23
24
 
24
- _RequestStreamEvent: TypeAlias = _RequestStreamEvent_PayloadPart
25
+ _RequestStreamEvent: TypeAlias = _RequestStreamEvent_PayloadPart | UnknownEvent
25
26
  RequestStreamEvent: TypeAlias = AnyIterator[_RequestStreamEvent]
26
27
 
27
28
 
28
29
  def serialize_event_json(value: _RequestStreamEvent) -> bytes:
30
+ if isinstance(value, UnknownEvent):
31
+ raise ValueError(
32
+ f"RequestStreamEvent: cannot serialize unknown event {value.event_type!r}"
33
+ )
29
34
  match value:
30
35
  case {"PayloadPart": payload}:
31
36
  import capo_sagemaker_runtime_http2.types.request_payload_part
@@ -65,6 +70,8 @@ def deserialize_event_json(
65
70
  message
66
71
  )
67
72
  }
73
+ case str():
74
+ return UnknownEvent(event_type, message)
68
75
  case _:
69
76
  raise ValueError(
70
77
  f"RequestStreamEvent: unrecognized event-type {event_type!r}"
@@ -10,6 +10,7 @@ from capo_sagemaker_runtime_http2._protocol.eventstream import Message
10
10
  from capo_sagemaker_runtime_http2.errors import (
11
11
  UnknownServiceError,
12
12
  )
13
+ from capo_sagemaker_runtime_http2.types._unknown import UnknownEvent
13
14
 
14
15
  if TYPE_CHECKING:
15
16
  import capo_sagemaker_runtime_http2.errors.internal_stream_failure
@@ -37,11 +38,16 @@ _ResponseStreamEvent: TypeAlias = (
37
38
  _ResponseStreamEvent_PayloadPart
38
39
  | _ResponseStreamEvent_ModelStreamError
39
40
  | _ResponseStreamEvent_InternalStreamFailure
41
+ | UnknownEvent
40
42
  )
41
43
  ResponseStreamEvent: TypeAlias = AnyIterator[_ResponseStreamEvent]
42
44
 
43
45
 
44
46
  def serialize_event_json(value: _ResponseStreamEvent) -> bytes:
47
+ if isinstance(value, UnknownEvent):
48
+ raise ValueError(
49
+ f"ResponseStreamEvent: cannot serialize unknown event {value.event_type!r}"
50
+ )
45
51
  match value:
46
52
  case {"PayloadPart": payload}:
47
53
  import capo_sagemaker_runtime_http2.types.response_payload_part
@@ -112,6 +118,8 @@ def deserialize_event_json(
112
118
  message
113
119
  )
114
120
  }
121
+ case str():
122
+ return UnknownEvent(event_type, message)
115
123
  case _:
116
124
  raise ValueError(
117
125
  f"ResponseStreamEvent: unrecognized event-type {event_type!r}"
@@ -1,7 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: capo-sagemaker-runtime-http2
3
- Version: 0.8.0
3
+ Version: 0.9.0
4
4
  Summary: Python SDK for AWS Sagemaker Runtime Http2.
5
+ Project-URL: Homepage, https://capo-sdk.dev/
6
+ Project-URL: Documentation, https://capo-sdk.dev/services/sagemaker-runtime-http2/
7
+ Project-URL: Repository, https://github.com/kap-sh/capo/tree/main/services/sagemaker-runtime-http2
8
+ Project-URL: Changelog, https://github.com/kap-sh/capo/blob/main/services/sagemaker-runtime-http2/CHANGELOG.md
5
9
  Classifier: Development Status :: 4 - Beta
6
10
  Classifier: Intended Audience :: Developers
7
11
  Classifier: License :: OSI Approved :: MIT License
@@ -26,7 +30,11 @@ Requires-Dist: capo-sso-oidc>=0.2.0; extra == "sso"
26
30
  Requires-Dist: capo-sts>=0.3.0; extra == "sso"
27
31
  Dynamic: license-file
28
32
 
29
- # Getting Started
33
+ # capo-sagemaker-runtime-http2: typed, async Python SDK for AWS Sagemaker Runtime Http2
34
+
35
+ `capo-sagemaker-runtime-http2` is a typed Python SDK for AWS Sagemaker Runtime Http2. It has an async client, `AsyncSageMakerRuntimeHTTP2Client`, for asyncio and trio, and a sync client, `SageMakerRuntimeHTTP2Client`, with the same methods. Requests and responses are typed with TypedDicts, so your editor and type checker know every field.
36
+
37
+ It is part of [capo](https://capo-sdk.dev/), a community-driven alternative to boto3 and aioboto3, built on its own HTTP stack instead of botocore and generated from the official AWS Smithy models. Documentation: [https://capo-sdk.dev/services/sagemaker-runtime-http2/](https://capo-sdk.dev/services/sagemaker-runtime-http2/)
30
38
 
31
39
  ## Installation
32
40
 
@@ -40,6 +40,7 @@ src/capo_sagemaker_runtime_http2/errors/internal_stream_failure.py
40
40
  src/capo_sagemaker_runtime_http2/errors/model_error.py
41
41
  src/capo_sagemaker_runtime_http2/errors/model_stream_error.py
42
42
  src/capo_sagemaker_runtime_http2/errors/service_unavailable_error.py
43
+ src/capo_sagemaker_runtime_http2/types/_unknown.py
43
44
  src/capo_sagemaker_runtime_http2/types/invoke_endpoint_with_bidirectional_stream_input.py
44
45
  src/capo_sagemaker_runtime_http2/types/invoke_endpoint_with_bidirectional_stream_output.py
45
46
  src/capo_sagemaker_runtime_http2/types/request_payload_part.py