capo-keyspacesstreams 0.3.0__tar.gz → 0.5.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.
- {capo_keyspacesstreams-0.3.0/src/capo_keyspacesstreams.egg-info → capo_keyspacesstreams-0.5.0}/PKG-INFO +2 -2
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/pyproject.toml +2 -2
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_auth/_sigv4.py +9 -9
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_operations/keyspaces_streams/get_records.py +5 -1
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_operations/keyspaces_streams/get_shard_iterator.py +5 -1
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_operations/keyspaces_streams/get_stream.py +5 -1
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_operations/keyspaces_streams/list_streams.py +5 -1
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_services/_pipeline.py +2 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_services/async_keyspaces_streams.py +12 -4
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_services/keyspaces_streams.py +12 -4
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0/src/capo_keyspacesstreams.egg-info}/PKG-INFO +2 -2
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams.egg-info/requires.txt +1 -1
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/tests/test_sigv4.py +21 -6
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/LICENSE +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/README.md +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/setup.cfg +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/__init__.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_async.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_auth/_identity.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_auth/_providers.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_auth/_signers.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_auth/_zapros_handler.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_body.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_iter.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_pagination.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_protocol/__init__.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_protocol/errors.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_protocol/eventstream.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_protocol/serialize.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_protocol/xml.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_rule_engine/__init__.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_rule_engine/_aws_partition.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_rule_engine/_endpoint_rule_set.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_rule_engine/_endpoint_runtime.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_services/_aws_config.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/errors/__init__.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/errors/_base.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/errors/access_denied_exception.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/errors/internal_server_exception.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/errors/resource_not_found_exception.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/errors/throttling_exception.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/errors/validation_exception.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/py.typed +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/_prelude/blob.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/_prelude/timestamp.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/date.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/get_records_input.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/get_records_output.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/get_shard_iterator_input.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/get_shard_iterator_output.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/get_stream_input.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/get_stream_output.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/iterator_description.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/iterator_position.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/keyspace_name.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/keyspaces_cell.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/keyspaces_cell_list.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/keyspaces_cell_map.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/keyspaces_cell_map_definition.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/keyspaces_cell_value.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/keyspaces_cells.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/keyspaces_keys_map.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/keyspaces_metadata.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/keyspaces_row.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/keyspaces_udt_map.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/list_streams_input.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/list_streams_output.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/origin_type.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/record.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/record_list.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/sequence_number.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/sequence_number_range.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/shard.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/shard_description_list.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/shard_filter.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/shard_filter_type.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/shard_id.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/shard_id_list.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/shard_id_token.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/shard_iterator.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/shard_iterator_type.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/stream.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/stream_arn.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/stream_arn_token.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/stream_list.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/stream_status.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/stream_view_type.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/table_name.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/validation_exception_type.py +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams.egg-info/SOURCES.txt +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams.egg-info/dependency_links.txt +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams.egg-info/top_level.txt +0 -0
- {capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/tests/test_body.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: capo-keyspacesstreams
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Python SDK for AWS Keyspacesstreams.
|
|
5
5
|
Classifier: Development Status :: 4 - Beta
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -17,7 +17,7 @@ Classifier: Typing :: Typed
|
|
|
17
17
|
Requires-Python: >=3.10
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
|
-
Requires-Dist: zapros>=0.
|
|
20
|
+
Requires-Dist: zapros>=0.21.0
|
|
21
21
|
Provides-Extra: anyio
|
|
22
22
|
Requires-Dist: anyio>=3.0; extra == "anyio"
|
|
23
23
|
Provides-Extra: sso
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "capo-keyspacesstreams"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.5.0"
|
|
4
4
|
description = "Python SDK for AWS Keyspacesstreams."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -19,7 +19,7 @@ classifiers = [
|
|
|
19
19
|
"Typing :: Typed",
|
|
20
20
|
]
|
|
21
21
|
dependencies = [
|
|
22
|
-
"zapros>=0.
|
|
22
|
+
"zapros>=0.21.0",
|
|
23
23
|
]
|
|
24
24
|
|
|
25
25
|
[project.optional-dependencies]
|
|
@@ -17,7 +17,7 @@ import hmac
|
|
|
17
17
|
import re
|
|
18
18
|
from collections.abc import AsyncIterator, Iterator
|
|
19
19
|
from typing import Any, Literal, TypedDict, cast
|
|
20
|
-
from urllib.parse import quote
|
|
20
|
+
from urllib.parse import quote
|
|
21
21
|
|
|
22
22
|
import zapros
|
|
23
23
|
from pywhatwgurl import URLSearchParams
|
|
@@ -134,11 +134,11 @@ def _remove_dot_segments(path: str) -> str:
|
|
|
134
134
|
def _canonical_path(path: str, *, double_encode: bool, normalize: bool) -> str:
|
|
135
135
|
"""Build CanonicalURI.
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
normalize dot segments and URI-encode each
|
|
139
|
-
rules-engine ``disableNormalizePath`` /
|
|
140
|
-
turn those steps off — S3-family
|
|
141
|
-
signed exactly as provided.
|
|
137
|
+
``path`` is the path as sent on the wire, so it is already URI-encoded
|
|
138
|
+
once. Standard services normalize dot segments and URI-encode each
|
|
139
|
+
segment a second time. The rules-engine ``disableNormalizePath`` /
|
|
140
|
+
``disableDoubleEncoding`` flags turn those steps off — S3-family
|
|
141
|
+
services set both, so the path is signed exactly as provided.
|
|
142
142
|
"""
|
|
143
143
|
if not path:
|
|
144
144
|
return "/"
|
|
@@ -148,9 +148,9 @@ def _canonical_path(path: str, *, double_encode: bool, normalize: bool) -> str:
|
|
|
148
148
|
path = _remove_dot_segments(path)
|
|
149
149
|
if not double_encode:
|
|
150
150
|
return path
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return quote(
|
|
151
|
+
# Never decode first: that would turn a "%2F" inside a segment (an ARN in
|
|
152
|
+
# a path label) into a separator and leave it out of the second encoding.
|
|
153
|
+
return quote(path, safe="/~")
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
def _canonical_query(query: str) -> str:
|
|
@@ -129,7 +129,11 @@ def build_request(
|
|
|
129
129
|
allow_nan=False,
|
|
130
130
|
).encode()
|
|
131
131
|
headers["content-type"] = "application/x-amz-json-1.0"
|
|
132
|
-
signer =
|
|
132
|
+
signer = (
|
|
133
|
+
None
|
|
134
|
+
if options.anonymous
|
|
135
|
+
else get_signer(options, auth_schemes=endpoint.properties.get("authSchemes"))
|
|
136
|
+
)
|
|
133
137
|
normalized_url = zapros.URL(url)
|
|
134
138
|
for k, v in params:
|
|
135
139
|
normalized_url.search_params.append(k, v)
|
|
@@ -126,7 +126,11 @@ def build_request(
|
|
|
126
126
|
allow_nan=False,
|
|
127
127
|
).encode()
|
|
128
128
|
headers["content-type"] = "application/x-amz-json-1.0"
|
|
129
|
-
signer =
|
|
129
|
+
signer = (
|
|
130
|
+
None
|
|
131
|
+
if options.anonymous
|
|
132
|
+
else get_signer(options, auth_schemes=endpoint.properties.get("authSchemes"))
|
|
133
|
+
)
|
|
130
134
|
normalized_url = zapros.URL(url)
|
|
131
135
|
for k, v in params:
|
|
132
136
|
normalized_url.search_params.append(k, v)
|
|
@@ -132,7 +132,11 @@ def build_request(
|
|
|
132
132
|
allow_nan=False,
|
|
133
133
|
).encode()
|
|
134
134
|
headers["content-type"] = "application/x-amz-json-1.0"
|
|
135
|
-
signer =
|
|
135
|
+
signer = (
|
|
136
|
+
None
|
|
137
|
+
if options.anonymous
|
|
138
|
+
else get_signer(options, auth_schemes=endpoint.properties.get("authSchemes"))
|
|
139
|
+
)
|
|
136
140
|
normalized_url = zapros.URL(url)
|
|
137
141
|
for k, v in params:
|
|
138
142
|
normalized_url.search_params.append(k, v)
|
|
@@ -128,7 +128,11 @@ def build_request(
|
|
|
128
128
|
allow_nan=False,
|
|
129
129
|
).encode()
|
|
130
130
|
headers["content-type"] = "application/x-amz-json-1.0"
|
|
131
|
-
signer =
|
|
131
|
+
signer = (
|
|
132
|
+
None
|
|
133
|
+
if options.anonymous
|
|
134
|
+
else get_signer(options, auth_schemes=endpoint.properties.get("authSchemes"))
|
|
135
|
+
)
|
|
132
136
|
normalized_url = zapros.URL(url)
|
|
133
137
|
for k, v in params:
|
|
134
138
|
normalized_url.search_params.append(k, v)
|
|
@@ -39,6 +39,7 @@ class OperationOptions:
|
|
|
39
39
|
region: str | None = None
|
|
40
40
|
retry_max_attempts: int | None = None
|
|
41
41
|
credentials_provider: IdentityProvider[Credentials] | None = None
|
|
42
|
+
anonymous: bool | None = None
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
@dataclass
|
|
@@ -49,6 +50,7 @@ class AsyncOperationOptions:
|
|
|
49
50
|
region: str | None = None
|
|
50
51
|
retry_max_attempts: int | None = None
|
|
51
52
|
credentials_provider: IdentityProvider[Credentials] | None = None
|
|
53
|
+
anonymous: bool | None = None
|
|
52
54
|
|
|
53
55
|
|
|
54
56
|
@dataclass
|
|
@@ -58,6 +58,7 @@ class AsyncKeyspacesStreamsClientConfig(TypedDict, total=False, closed=True):
|
|
|
58
58
|
endpoint: str | None
|
|
59
59
|
region: str | None
|
|
60
60
|
credentials_provider: IdentityProvider[Credentials] | None
|
|
61
|
+
anonymous: bool | None
|
|
61
62
|
|
|
62
63
|
|
|
63
64
|
class AsyncKeyspacesStreamsClient:
|
|
@@ -72,6 +73,7 @@ class AsyncKeyspacesStreamsClient:
|
|
|
72
73
|
region: The value of the ``AWS::Region`` endpoint parameter.
|
|
73
74
|
credentials: AWS credentials for request signing.
|
|
74
75
|
credentials_provider: Provider that resolves AWS credentials. Takes precedence over ``credentials``.
|
|
76
|
+
anonymous: Send requests unsigned, without resolving credentials, even for operations that require authentication.
|
|
75
77
|
"""
|
|
76
78
|
|
|
77
79
|
def __init__(
|
|
@@ -84,10 +86,14 @@ class AsyncKeyspacesStreamsClient:
|
|
|
84
86
|
region: str | None = None,
|
|
85
87
|
credentials: Credentials | None = None,
|
|
86
88
|
credentials_provider: CredentialsProvider | None = None,
|
|
89
|
+
anonymous: bool | None = None,
|
|
87
90
|
):
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
client = AsyncClient(http_handler)
|
|
92
|
+
# The handler the user gave us, or the default one for this environment.
|
|
93
|
+
# The SDK middlewares wrap it below, and the credential resolvers borrow
|
|
94
|
+
# it for their one-off calls.
|
|
95
|
+
raw_handler = client.handler
|
|
96
|
+
self._client = client.wrap_with_middleware(lambda next: AuthMiddleware(next))
|
|
91
97
|
if credentials is not None and credentials_provider is not None:
|
|
92
98
|
warnings.warn(
|
|
93
99
|
"Both credentials and credentials_provider given; provider takes precedence"
|
|
@@ -99,7 +105,7 @@ class AsyncKeyspacesStreamsClient:
|
|
|
99
105
|
resolved_credentials_provider = StaticAwsCredentialsProvider(credentials)
|
|
100
106
|
if resolved_credentials_provider is None and credentials is None:
|
|
101
107
|
resolved_credentials_provider = default_aws_credentials_chain(
|
|
102
|
-
AsyncClient(
|
|
108
|
+
AsyncClient(raw_handler)
|
|
103
109
|
)
|
|
104
110
|
self._config = AsyncKeyspacesStreamsClientConfig(
|
|
105
111
|
{
|
|
@@ -109,6 +115,7 @@ class AsyncKeyspacesStreamsClient:
|
|
|
109
115
|
"endpoint": endpoint,
|
|
110
116
|
"region": region,
|
|
111
117
|
"credentials_provider": resolved_credentials_provider,
|
|
118
|
+
"anonymous": anonymous,
|
|
112
119
|
}
|
|
113
120
|
)
|
|
114
121
|
|
|
@@ -134,6 +141,7 @@ class AsyncKeyspacesStreamsClient:
|
|
|
134
141
|
credentials_provider=overrides.get(
|
|
135
142
|
"credentials_provider", self._config.get("credentials_provider")
|
|
136
143
|
),
|
|
144
|
+
anonymous=overrides.get("anonymous", self._config.get("anonymous")),
|
|
137
145
|
)
|
|
138
146
|
return interceptors_, options_
|
|
139
147
|
|
|
@@ -58,6 +58,7 @@ class KeyspacesStreamsClientConfig(TypedDict, total=False, closed=True):
|
|
|
58
58
|
endpoint: str | None
|
|
59
59
|
region: str | None
|
|
60
60
|
credentials_provider: IdentityProvider[Credentials] | None
|
|
61
|
+
anonymous: bool | None
|
|
61
62
|
|
|
62
63
|
|
|
63
64
|
class KeyspacesStreamsClient:
|
|
@@ -72,6 +73,7 @@ class KeyspacesStreamsClient:
|
|
|
72
73
|
region: The value of the ``AWS::Region`` endpoint parameter.
|
|
73
74
|
credentials: AWS credentials for request signing.
|
|
74
75
|
credentials_provider: Provider that resolves AWS credentials. Takes precedence over ``credentials``.
|
|
76
|
+
anonymous: Send requests unsigned, without resolving credentials, even for operations that require authentication.
|
|
75
77
|
"""
|
|
76
78
|
|
|
77
79
|
def __init__(
|
|
@@ -84,10 +86,14 @@ class KeyspacesStreamsClient:
|
|
|
84
86
|
region: str | None = None,
|
|
85
87
|
credentials: Credentials | None = None,
|
|
86
88
|
credentials_provider: CredentialsProvider | None = None,
|
|
89
|
+
anonymous: bool | None = None,
|
|
87
90
|
):
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
client = Client(http_handler)
|
|
92
|
+
# The handler the user gave us, or the default one for this environment.
|
|
93
|
+
# The SDK middlewares wrap it below, and the credential resolvers borrow
|
|
94
|
+
# it for their one-off calls.
|
|
95
|
+
raw_handler = client.handler
|
|
96
|
+
self._client = client.wrap_with_middleware(lambda next: AuthMiddleware(next))
|
|
91
97
|
if credentials is not None and credentials_provider is not None:
|
|
92
98
|
warnings.warn(
|
|
93
99
|
"Both credentials and credentials_provider given; provider takes precedence"
|
|
@@ -99,7 +105,7 @@ class KeyspacesStreamsClient:
|
|
|
99
105
|
resolved_credentials_provider = StaticAwsCredentialsProvider(credentials)
|
|
100
106
|
if resolved_credentials_provider is None and credentials is None:
|
|
101
107
|
resolved_credentials_provider = default_aws_credentials_chain(
|
|
102
|
-
Client(
|
|
108
|
+
Client(raw_handler)
|
|
103
109
|
)
|
|
104
110
|
self._config = KeyspacesStreamsClientConfig(
|
|
105
111
|
{
|
|
@@ -109,6 +115,7 @@ class KeyspacesStreamsClient:
|
|
|
109
115
|
"endpoint": endpoint,
|
|
110
116
|
"region": region,
|
|
111
117
|
"credentials_provider": resolved_credentials_provider,
|
|
118
|
+
"anonymous": anonymous,
|
|
112
119
|
}
|
|
113
120
|
)
|
|
114
121
|
|
|
@@ -134,6 +141,7 @@ class KeyspacesStreamsClient:
|
|
|
134
141
|
credentials_provider=overrides.get(
|
|
135
142
|
"credentials_provider", self._config.get("credentials_provider")
|
|
136
143
|
),
|
|
144
|
+
anonymous=overrides.get("anonymous", self._config.get("anonymous")),
|
|
137
145
|
)
|
|
138
146
|
return interceptors_, options_
|
|
139
147
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: capo-keyspacesstreams
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0
|
|
4
4
|
Summary: Python SDK for AWS Keyspacesstreams.
|
|
5
5
|
Classifier: Development Status :: 4 - Beta
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -17,7 +17,7 @@ Classifier: Typing :: Typed
|
|
|
17
17
|
Requires-Python: >=3.10
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
|
-
Requires-Dist: zapros>=0.
|
|
20
|
+
Requires-Dist: zapros>=0.21.0
|
|
21
21
|
Provides-Extra: anyio
|
|
22
22
|
Requires-Dist: anyio>=3.0; extra == "anyio"
|
|
23
23
|
Provides-Extra: sso
|
|
@@ -91,13 +91,28 @@ class TestCanonicalPath:
|
|
|
91
91
|
def test_s3_preserves_dot_segments(self):
|
|
92
92
|
assert _s3_path("/a/../b/./c") == "/a/../b/./c"
|
|
93
93
|
|
|
94
|
-
def
|
|
95
|
-
#
|
|
96
|
-
assert _std_path("/foo bar") == "/foo%2520bar"
|
|
97
|
-
|
|
98
|
-
def test_non_s3_already_encoded_double_encodes(self):
|
|
99
|
-
# "/foo%20bar" gets unquoted to "/foo bar", then double-encoded.
|
|
94
|
+
def test_non_s3_encodes_wire_path_once_more(self):
|
|
95
|
+
# The path arrives URI-encoded once ("/foo bar" is sent as "/foo%20bar").
|
|
100
96
|
assert _std_path("/foo%20bar") == "/foo%2520bar"
|
|
97
|
+
assert _std_path("/a%3Ab/caf%C3%A9~") == "/a%253Ab/caf%25C3%25A9~"
|
|
98
|
+
|
|
99
|
+
def test_non_s3_keeps_encoded_slash_inside_segment(self):
|
|
100
|
+
# An ARN in a path label: its "/" is sent as "%2F" and must stay part
|
|
101
|
+
# of the segment, not become a separator.
|
|
102
|
+
assert (
|
|
103
|
+
_std_path("/model/arn%3Aaws%3Abedrock%3A%3Afoundation-model%2Fx/converse")
|
|
104
|
+
== "/model/arn%253Aaws%253Abedrock%253A%253Afoundation-model%252Fx/converse"
|
|
105
|
+
)
|
|
106
|
+
assert _s3_path("/bucket/a%2Fb") == "/bucket/a%2Fb"
|
|
107
|
+
|
|
108
|
+
def test_non_s3_encodes_literal_reserved_characters_once(self):
|
|
109
|
+
# "@" and "$" appear literally in a few URI templates and are sent as is.
|
|
110
|
+
assert _std_path("/@connections/abc") == "/%40connections/abc"
|
|
111
|
+
assert _std_path("/things/t/jobs/$next") == "/things/t/jobs/%24next"
|
|
112
|
+
|
|
113
|
+
def test_non_s3_does_not_decode_the_wire_path(self):
|
|
114
|
+
assert _std_path("/a%2fb") == "/a%252fb"
|
|
115
|
+
assert _std_path("/a%25b") == "/a%2525b"
|
|
101
116
|
|
|
102
117
|
def test_non_s3_removes_dot_segments(self):
|
|
103
118
|
# Mirrors botocore's normalize_url_path: "." dropped, ".." pops,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/__init__.py
RENAMED
|
File without changes
|
{capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_async.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_body.py
RENAMED
|
File without changes
|
{capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_iter.py
RENAMED
|
File without changes
|
{capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/_pagination.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
|
{capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/date.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
|
|
File without changes
|
{capo_keyspacesstreams-0.3.0 → capo_keyspacesstreams-0.5.0}/src/capo_keyspacesstreams/types/shard.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
|