botocore-stubs 1.35.69__py3-none-any.whl → 1.35.70__py3-none-any.whl
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.
Potentially problematic release.
This version of botocore-stubs might be problematic. Click here for more details.
- botocore-stubs/__init__.pyi +6 -2
- botocore-stubs/args.pyi +22 -24
- botocore-stubs/auth.pyi +34 -30
- botocore-stubs/awsrequest.pyi +25 -21
- botocore-stubs/client.pyi +31 -27
- botocore-stubs/compat.pyi +14 -9
- botocore-stubs/compress.pyi +6 -3
- botocore-stubs/config.pyi +27 -29
- botocore-stubs/configloader.pyi +9 -5
- botocore-stubs/configprovider.pyi +27 -25
- botocore-stubs/credentials.pyi +73 -69
- botocore-stubs/crt/__init__.pyi +1 -3
- botocore-stubs/crt/auth.pyi +4 -2
- botocore-stubs/discovery.pyi +11 -8
- botocore-stubs/docs/__init__.pyi +1 -3
- botocore-stubs/docs/bcdoc/docstringparser.pyi +11 -7
- botocore-stubs/docs/bcdoc/restdoc.pyi +10 -6
- botocore-stubs/docs/bcdoc/style.pyi +11 -7
- botocore-stubs/docs/client.pyi +8 -4
- botocore-stubs/docs/docstring.pyi +4 -2
- botocore-stubs/docs/example.pyi +20 -16
- botocore-stubs/docs/method.pyi +16 -12
- botocore-stubs/docs/paginator.pyi +4 -0
- botocore-stubs/docs/params.pyi +18 -14
- botocore-stubs/docs/service.pyi +6 -2
- botocore-stubs/docs/shape.pyi +6 -2
- botocore-stubs/docs/sharedexample.pyi +4 -0
- botocore-stubs/docs/translator.pyi +6 -2
- botocore-stubs/docs/utils.pyi +8 -4
- botocore-stubs/docs/waiter.pyi +4 -0
- botocore-stubs/endpoint.pyi +15 -11
- botocore-stubs/endpoint_provider.pyi +38 -39
- botocore-stubs/errorfactory.pyi +7 -3
- botocore-stubs/eventstream.pyi +20 -16
- botocore-stubs/exceptions.pyi +8 -10
- botocore-stubs/handlers.pyi +10 -6
- botocore-stubs/history.pyi +6 -2
- botocore-stubs/hooks.pyi +19 -17
- botocore-stubs/httpchecksum.pyi +13 -10
- botocore-stubs/httpsession.pyi +21 -17
- botocore-stubs/loaders.pyi +17 -13
- botocore-stubs/model.pyi +50 -46
- botocore-stubs/monitoring.pyi +23 -20
- botocore-stubs/paginate.pyi +7 -3
- botocore-stubs/parsers.pyi +11 -7
- botocore-stubs/regions.pyi +18 -14
- botocore-stubs/response.pyi +8 -4
- botocore-stubs/retries/adaptive.pyi +5 -1
- botocore-stubs/retries/bucket.pyi +4 -0
- botocore-stubs/retries/quota.pyi +6 -2
- botocore-stubs/retries/special.pyi +4 -0
- botocore-stubs/retries/standard.pyi +16 -12
- botocore-stubs/retries/throttling.pyi +4 -0
- botocore-stubs/retryhandler.pyi +10 -6
- botocore-stubs/serialize.pyi +11 -7
- botocore-stubs/session.pyi +43 -49
- botocore-stubs/signers.pyi +26 -24
- botocore-stubs/stub.pyi +13 -15
- botocore-stubs/tokens.pyi +10 -6
- botocore-stubs/translate.pyi +6 -2
- botocore-stubs/useragent.pyi +9 -5
- botocore-stubs/utils.pyi +57 -58
- botocore-stubs/validate.pyi +5 -1
- botocore-stubs/waiter.pyi +9 -5
- {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.70.dist-info}/METADATA +1 -2
- botocore_stubs-1.35.70.dist-info/RECORD +73 -0
- botocore_stubs-1.35.69.dist-info/RECORD +0 -73
- {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.70.dist-info}/LICENSE +0 -0
- {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.70.dist-info}/WHEEL +0 -0
- {botocore_stubs-1.35.69.dist-info → botocore_stubs-1.35.70.dist-info}/top_level.txt +0 -0
botocore-stubs/serialize.pyi
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import Any, Mapping, Pattern
|
|
2
6
|
|
|
3
7
|
from botocore.compat import formatdate as formatdate
|
|
4
8
|
from botocore.model import OperationModel
|
|
@@ -15,17 +19,17 @@ def create_serializer(protocol_name: str, include_validation: bool = ...) -> Any
|
|
|
15
19
|
|
|
16
20
|
class Serializer:
|
|
17
21
|
DEFAULT_METHOD: str = ...
|
|
18
|
-
MAP_TYPE:
|
|
22
|
+
MAP_TYPE: type[dict[str, Any]] = ...
|
|
19
23
|
DEFAULT_ENCODING: str = ...
|
|
20
24
|
def serialize_to_request(
|
|
21
25
|
self, parameters: Mapping[str, Any], operation_model: OperationModel
|
|
22
|
-
) ->
|
|
26
|
+
) -> dict[str, Any]: ...
|
|
23
27
|
|
|
24
28
|
class QuerySerializer(Serializer):
|
|
25
29
|
TIMESTAMP_FORMAT: str = ...
|
|
26
30
|
def serialize_to_request(
|
|
27
31
|
self, parameters: Mapping[str, Any], operation_model: OperationModel
|
|
28
|
-
) ->
|
|
32
|
+
) -> dict[str, Any]: ...
|
|
29
33
|
|
|
30
34
|
class EC2Serializer(QuerySerializer): ...
|
|
31
35
|
|
|
@@ -33,7 +37,7 @@ class JSONSerializer(Serializer):
|
|
|
33
37
|
TIMESTAMP_FORMAT: str = ...
|
|
34
38
|
def serialize_to_request(
|
|
35
39
|
self, parameters: Mapping[str, Any], operation_model: OperationModel
|
|
36
|
-
) ->
|
|
40
|
+
) -> dict[str, Any]: ...
|
|
37
41
|
|
|
38
42
|
class BaseRestSerializer(Serializer):
|
|
39
43
|
QUERY_STRING_TIMESTAMP_FORMAT: str = ...
|
|
@@ -41,11 +45,11 @@ class BaseRestSerializer(Serializer):
|
|
|
41
45
|
KNOWN_LOCATIONS: Any = ...
|
|
42
46
|
def serialize_to_request(
|
|
43
47
|
self, parameters: Mapping[str, Any], operation_model: OperationModel
|
|
44
|
-
) ->
|
|
48
|
+
) -> dict[str, Any]: ...
|
|
45
49
|
|
|
46
50
|
class RestJSONSerializer(BaseRestSerializer, JSONSerializer): ...
|
|
47
51
|
|
|
48
52
|
class RestXMLSerializer(BaseRestSerializer):
|
|
49
53
|
TIMESTAMP_FORMAT: str = ...
|
|
50
54
|
|
|
51
|
-
SERIALIZERS:
|
|
55
|
+
SERIALIZERS: dict[str, Serializer]
|
botocore-stubs/session.pyi
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
2
5
|
from collections.abc import MutableMapping
|
|
3
6
|
from logging import Logger
|
|
4
|
-
from typing import IO, Any,
|
|
7
|
+
from typing import IO, Any, Iterator, Mapping, Protocol
|
|
5
8
|
|
|
6
9
|
from botocore.client import BaseClient, Config
|
|
7
10
|
from botocore.compat import HAS_CRT as HAS_CRT
|
|
@@ -33,20 +36,13 @@ from botocore.utils import EVENT_ALIASES as EVENT_ALIASES
|
|
|
33
36
|
from botocore.utils import validate_region_name as validate_region_name
|
|
34
37
|
from botocore.waiter import WaiterModel
|
|
35
38
|
|
|
36
|
-
if sys.version_info >= (3, 9):
|
|
37
|
-
from typing import Protocol
|
|
38
|
-
else:
|
|
39
|
-
from typing_extensions import Protocol
|
|
40
|
-
|
|
41
39
|
logger: Logger = ...
|
|
42
40
|
|
|
43
|
-
_EnvDict = Dict[str, Tuple[Any, Any, Any, Any]]
|
|
44
|
-
|
|
45
41
|
class _EventHandler(Protocol):
|
|
46
42
|
def __call__(self, **kwargs: Any) -> None: ...
|
|
47
43
|
|
|
48
44
|
class Session:
|
|
49
|
-
SESSION_VARIABLES:
|
|
45
|
+
SESSION_VARIABLES: dict[str, tuple[Any, Any, Any, Any]]
|
|
50
46
|
LOG_FORMAT: str
|
|
51
47
|
user_agent_name: str
|
|
52
48
|
user_agent_version: str
|
|
@@ -54,62 +50,60 @@ class Session:
|
|
|
54
50
|
session_var_map: SessionVarDict
|
|
55
51
|
def __init__(
|
|
56
52
|
self,
|
|
57
|
-
session_vars:
|
|
58
|
-
event_hooks:
|
|
53
|
+
session_vars: dict[str, tuple[Any, Any, Any, Any]] | None = ...,
|
|
54
|
+
event_hooks: BaseEventHooks | None = ...,
|
|
59
55
|
include_builtin_handlers: bool = ...,
|
|
60
|
-
profile:
|
|
56
|
+
profile: str | None = ...,
|
|
61
57
|
) -> None: ...
|
|
62
58
|
@property
|
|
63
|
-
def available_profiles(self) ->
|
|
59
|
+
def available_profiles(self) -> list[str]: ...
|
|
64
60
|
@property
|
|
65
|
-
def profile(self) ->
|
|
66
|
-
def get_config_variable(self, logical_name: str, methods:
|
|
61
|
+
def profile(self) -> str | None: ...
|
|
62
|
+
def get_config_variable(self, logical_name: str, methods: Any | None = ...) -> Any: ...
|
|
67
63
|
def set_config_variable(self, logical_name: str, value: Any) -> None: ...
|
|
68
|
-
def instance_variables(self) ->
|
|
69
|
-
def get_scoped_config(self) ->
|
|
64
|
+
def instance_variables(self) -> dict[str, Any]: ...
|
|
65
|
+
def get_scoped_config(self) -> dict[str, Any]: ...
|
|
70
66
|
@property
|
|
71
|
-
def full_config(self) ->
|
|
67
|
+
def full_config(self) -> dict[str, Any]: ...
|
|
72
68
|
def get_default_client_config(self) -> Config: ...
|
|
73
69
|
def set_default_client_config(self, client_config: Config) -> None: ...
|
|
74
70
|
def set_credentials(
|
|
75
|
-
self, access_key: str, secret_key: str, token:
|
|
71
|
+
self, access_key: str, secret_key: str, token: str | None = ...
|
|
76
72
|
) -> None: ...
|
|
77
73
|
def get_credentials(self) -> Credentials: ...
|
|
78
74
|
def get_auth_token(self) -> FrozenAuthToken: ...
|
|
79
75
|
def user_agent(self) -> str: ...
|
|
80
76
|
def get_data(self, data_path: str) -> Any: ...
|
|
81
77
|
def get_service_model(
|
|
82
|
-
self, service_name: str, api_version:
|
|
78
|
+
self, service_name: str, api_version: str | None = ...
|
|
83
79
|
) -> ServiceModel: ...
|
|
84
|
-
def get_waiter_model(
|
|
85
|
-
self, service_name: str, api_version: Optional[str] = ...
|
|
86
|
-
) -> WaiterModel: ...
|
|
80
|
+
def get_waiter_model(self, service_name: str, api_version: str | None = ...) -> WaiterModel: ...
|
|
87
81
|
def get_paginator_model(
|
|
88
|
-
self, service_name: str, api_version:
|
|
82
|
+
self, service_name: str, api_version: str | None = ...
|
|
89
83
|
) -> PaginatorModel: ...
|
|
90
|
-
def get_service_data(self, service_name: str, api_version:
|
|
84
|
+
def get_service_data(self, service_name: str, api_version: str | None = ...) -> Any: ...
|
|
91
85
|
def get_available_services(self) -> Any: ...
|
|
92
86
|
def set_debug_logger(self, logger_name: str = ...) -> None: ...
|
|
93
87
|
def set_stream_logger(
|
|
94
88
|
self,
|
|
95
89
|
logger_name: str,
|
|
96
90
|
log_level: str,
|
|
97
|
-
stream:
|
|
98
|
-
format_string:
|
|
91
|
+
stream: IO[str] | None = ...,
|
|
92
|
+
format_string: str | None = ...,
|
|
99
93
|
) -> None: ...
|
|
100
94
|
def set_file_logger(self, log_level: str, path: str, logger_name: str = ...) -> None: ...
|
|
101
95
|
def register(
|
|
102
96
|
self,
|
|
103
97
|
event_name: str,
|
|
104
98
|
handler: _EventHandler,
|
|
105
|
-
unique_id:
|
|
99
|
+
unique_id: str | None = ...,
|
|
106
100
|
unique_id_uses_count: bool = ...,
|
|
107
101
|
) -> None: ...
|
|
108
102
|
def unregister(
|
|
109
103
|
self,
|
|
110
104
|
event_name: str,
|
|
111
|
-
handler:
|
|
112
|
-
unique_id:
|
|
105
|
+
handler: _EventHandler | None = ...,
|
|
106
|
+
unique_id: str | None = ...,
|
|
113
107
|
unique_id_uses_count: bool = ...,
|
|
114
108
|
) -> None: ...
|
|
115
109
|
def emit(self, event_name: str, **kwargs: Any) -> Any: ...
|
|
@@ -120,24 +114,24 @@ class Session:
|
|
|
120
114
|
def create_client(
|
|
121
115
|
self,
|
|
122
116
|
service_name: str,
|
|
123
|
-
region_name:
|
|
124
|
-
api_version:
|
|
125
|
-
use_ssl:
|
|
126
|
-
verify:
|
|
127
|
-
endpoint_url:
|
|
128
|
-
aws_access_key_id:
|
|
129
|
-
aws_secret_access_key:
|
|
130
|
-
aws_session_token:
|
|
131
|
-
config:
|
|
117
|
+
region_name: str | None = ...,
|
|
118
|
+
api_version: str | None = ...,
|
|
119
|
+
use_ssl: bool | None = ...,
|
|
120
|
+
verify: bool | str | None = ...,
|
|
121
|
+
endpoint_url: str | None = ...,
|
|
122
|
+
aws_access_key_id: str | None = ...,
|
|
123
|
+
aws_secret_access_key: str | None = ...,
|
|
124
|
+
aws_session_token: str | None = ...,
|
|
125
|
+
config: Config | None = ...,
|
|
132
126
|
) -> BaseClient: ...
|
|
133
|
-
def get_available_partitions(self) ->
|
|
127
|
+
def get_available_partitions(self) -> list[str]: ...
|
|
134
128
|
def get_partition_for_region(self, region_name: str) -> str: ...
|
|
135
129
|
def get_available_regions(
|
|
136
130
|
self,
|
|
137
131
|
service_name: str,
|
|
138
132
|
partition_name: str = ...,
|
|
139
133
|
allow_non_regional: bool = ...,
|
|
140
|
-
) ->
|
|
134
|
+
) -> list[str]: ...
|
|
141
135
|
|
|
142
136
|
class ComponentLocator:
|
|
143
137
|
def __init__(self) -> None: ...
|
|
@@ -154,14 +148,14 @@ class SessionVarDict(MutableMapping[str, Any]):
|
|
|
154
148
|
def __len__(self) -> int: ...
|
|
155
149
|
|
|
156
150
|
class SubsetChainConfigFactory:
|
|
157
|
-
def __init__(self, session: Session, methods: Any, environ:
|
|
151
|
+
def __init__(self, session: Session, methods: Any, environ: Any | None = ...) -> None: ...
|
|
158
152
|
def create_config_chain(
|
|
159
153
|
self,
|
|
160
|
-
instance_name:
|
|
161
|
-
env_var_names:
|
|
162
|
-
config_property_name:
|
|
163
|
-
default:
|
|
164
|
-
conversion_func:
|
|
154
|
+
instance_name: Any | None = ...,
|
|
155
|
+
env_var_names: Any | None = ...,
|
|
156
|
+
config_property_name: Any | None = ...,
|
|
157
|
+
default: Any | None = ...,
|
|
158
|
+
conversion_func: Any | None = ...,
|
|
165
159
|
) -> Any: ...
|
|
166
160
|
|
|
167
|
-
def get_session(env_vars:
|
|
161
|
+
def get_session(env_vars: dict[str, tuple[Any, Any, Any, Any]] | None = ...) -> Session: ...
|
botocore-stubs/signers.pyi
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import Any, Mapping
|
|
2
6
|
|
|
3
7
|
from botocore.awsrequest import create_request_object as create_request_object
|
|
4
8
|
from botocore.awsrequest import prepare_request_dict as prepare_request_dict
|
|
@@ -11,8 +15,6 @@ from botocore.hooks import BaseEventHooks
|
|
|
11
15
|
from botocore.model import ServiceId
|
|
12
16
|
from botocore.utils import datetime2timestamp as datetime2timestamp
|
|
13
17
|
|
|
14
|
-
_CredentialsUnion = Union[Credentials, ReadOnlyCredentials]
|
|
15
|
-
|
|
16
18
|
class RequestSigner:
|
|
17
19
|
def __init__(
|
|
18
20
|
self,
|
|
@@ -20,9 +22,9 @@ class RequestSigner:
|
|
|
20
22
|
region_name: str,
|
|
21
23
|
signing_name: str,
|
|
22
24
|
signature_version: str,
|
|
23
|
-
credentials:
|
|
25
|
+
credentials: Credentials | ReadOnlyCredentials,
|
|
24
26
|
event_emitter: BaseEventHooks,
|
|
25
|
-
auth_token:
|
|
27
|
+
auth_token: str | None = ...,
|
|
26
28
|
) -> None: ...
|
|
27
29
|
@property
|
|
28
30
|
def region_name(self) -> str: ...
|
|
@@ -31,23 +33,23 @@ class RequestSigner:
|
|
|
31
33
|
@property
|
|
32
34
|
def signing_name(self) -> str: ...
|
|
33
35
|
def handler(
|
|
34
|
-
self, operation_name:
|
|
36
|
+
self, operation_name: str | None = ..., request: Any | None = ..., **kwargs: Any
|
|
35
37
|
) -> Any: ...
|
|
36
38
|
def sign(
|
|
37
39
|
self,
|
|
38
40
|
operation_name: str,
|
|
39
41
|
request: Any,
|
|
40
|
-
region_name:
|
|
42
|
+
region_name: str | None = ...,
|
|
41
43
|
signing_type: str = ...,
|
|
42
|
-
expires_in:
|
|
43
|
-
signing_name:
|
|
44
|
+
expires_in: Any | None = ...,
|
|
45
|
+
signing_name: str | None = ...,
|
|
44
46
|
) -> None: ...
|
|
45
47
|
def get_auth_instance(
|
|
46
48
|
self,
|
|
47
49
|
signing_name: str,
|
|
48
50
|
region_name: str,
|
|
49
|
-
signature_version:
|
|
50
|
-
request_credentials:
|
|
51
|
+
signature_version: str | None = ...,
|
|
52
|
+
request_credentials: Credentials | ReadOnlyCredentials | None = ...,
|
|
51
53
|
**kwargs: Any,
|
|
52
54
|
) -> Any: ...
|
|
53
55
|
get_auth: Any = ...
|
|
@@ -56,8 +58,8 @@ class RequestSigner:
|
|
|
56
58
|
request_dict: Mapping[str, Any],
|
|
57
59
|
operation_name: str,
|
|
58
60
|
expires_in: int = ...,
|
|
59
|
-
region_name:
|
|
60
|
-
signing_name:
|
|
61
|
+
region_name: str | None = ...,
|
|
62
|
+
signing_name: str | None = ...,
|
|
61
63
|
) -> Any: ...
|
|
62
64
|
|
|
63
65
|
class CloudFrontSigner:
|
|
@@ -65,19 +67,19 @@ class CloudFrontSigner:
|
|
|
65
67
|
rsa_signer: Any = ...
|
|
66
68
|
def __init__(self, key_id: str, rsa_signer: Any) -> None: ...
|
|
67
69
|
def generate_presigned_url(
|
|
68
|
-
self, url: str, date_less_than:
|
|
70
|
+
self, url: str, date_less_than: Any | None = ..., policy: Any | None = ...
|
|
69
71
|
) -> str: ...
|
|
70
72
|
def build_policy(
|
|
71
73
|
self,
|
|
72
74
|
resource: Any,
|
|
73
75
|
date_less_than: Any,
|
|
74
|
-
date_greater_than:
|
|
75
|
-
ip_address:
|
|
76
|
+
date_greater_than: Any | None = ...,
|
|
77
|
+
ip_address: Any | None = ...,
|
|
76
78
|
) -> str: ...
|
|
77
79
|
|
|
78
80
|
def add_generate_db_auth_token(class_attributes: Any, **kwargs: Any) -> None: ...
|
|
79
81
|
def generate_db_auth_token(
|
|
80
|
-
self: Any, DBHostname: Any, Port: Any, DBUsername: Any, Region:
|
|
82
|
+
self: Any, DBHostname: Any, Port: Any, DBUsername: Any, Region: Any | None = ...
|
|
81
83
|
) -> Any: ...
|
|
82
84
|
|
|
83
85
|
class S3PostPresigner:
|
|
@@ -85,26 +87,26 @@ class S3PostPresigner:
|
|
|
85
87
|
def generate_presigned_post(
|
|
86
88
|
self,
|
|
87
89
|
request_dict: Mapping[str, Any],
|
|
88
|
-
fields:
|
|
89
|
-
conditions:
|
|
90
|
+
fields: Any | None = ...,
|
|
91
|
+
conditions: Any | None = ...,
|
|
90
92
|
expires_in: int = ...,
|
|
91
|
-
region_name:
|
|
93
|
+
region_name: str | None = ...,
|
|
92
94
|
) -> Any: ...
|
|
93
95
|
|
|
94
96
|
def add_generate_presigned_url(class_attributes: Any, **kwargs: Any) -> None: ...
|
|
95
97
|
def generate_presigned_url(
|
|
96
98
|
self: Any,
|
|
97
99
|
ClientMethod: Any,
|
|
98
|
-
Params:
|
|
100
|
+
Params: Any | None = ...,
|
|
99
101
|
ExpiresIn: int = ...,
|
|
100
|
-
HttpMethod:
|
|
102
|
+
HttpMethod: Any | None = ...,
|
|
101
103
|
) -> Any: ...
|
|
102
104
|
def add_generate_presigned_post(class_attributes: Any, **kwargs: Any) -> None: ...
|
|
103
105
|
def generate_presigned_post(
|
|
104
106
|
self: Any,
|
|
105
107
|
Bucket: Any,
|
|
106
108
|
Key: Any,
|
|
107
|
-
Fields:
|
|
108
|
-
Conditions:
|
|
109
|
+
Fields: Any | None = ...,
|
|
110
|
+
Conditions: Any | None = ...,
|
|
109
111
|
ExpiresIn: int = ...,
|
|
110
112
|
) -> Any: ...
|
botocore-stubs/stub.pyi
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
2
5
|
from types import TracebackType
|
|
3
|
-
from typing import Any,
|
|
6
|
+
from typing import Any, Literal, Mapping, TypeVar
|
|
4
7
|
|
|
5
8
|
from botocore.awsrequest import AWSResponse as AWSResponse
|
|
6
9
|
from botocore.client import BaseClient
|
|
@@ -10,11 +13,6 @@ from botocore.exceptions import StubResponseError as StubResponseError
|
|
|
10
13
|
from botocore.exceptions import UnStubbedResponseError as UnStubbedResponseError
|
|
11
14
|
from botocore.validate import validate_parameters as validate_parameters
|
|
12
15
|
|
|
13
|
-
if sys.version_info >= (3, 9):
|
|
14
|
-
from typing import Literal
|
|
15
|
-
else:
|
|
16
|
-
from typing_extensions import Literal
|
|
17
|
-
|
|
18
16
|
class _ANY:
|
|
19
17
|
def __eq__(self, other: object) -> Literal[True]: ...
|
|
20
18
|
def __ne__(self, other: object) -> Literal[False]: ...
|
|
@@ -30,9 +28,9 @@ class Stubber:
|
|
|
30
28
|
def __enter__(self: _R) -> _R: ...
|
|
31
29
|
def __exit__(
|
|
32
30
|
self,
|
|
33
|
-
exception_type:
|
|
34
|
-
exception_value:
|
|
35
|
-
traceback:
|
|
31
|
+
exception_type: type[BaseException] | None,
|
|
32
|
+
exception_value: BaseException | None,
|
|
33
|
+
traceback: TracebackType | None,
|
|
36
34
|
) -> None: ...
|
|
37
35
|
def activate(self) -> None: ...
|
|
38
36
|
def deactivate(self) -> None: ...
|
|
@@ -40,7 +38,7 @@ class Stubber:
|
|
|
40
38
|
self,
|
|
41
39
|
method: str,
|
|
42
40
|
service_response: Mapping[str, Any],
|
|
43
|
-
expected_params:
|
|
41
|
+
expected_params: Mapping[str, Any] | None = ...,
|
|
44
42
|
) -> None: ...
|
|
45
43
|
def add_client_error(
|
|
46
44
|
self,
|
|
@@ -48,9 +46,9 @@ class Stubber:
|
|
|
48
46
|
service_error_code: str = ...,
|
|
49
47
|
service_message: str = ...,
|
|
50
48
|
http_status_code: int = ...,
|
|
51
|
-
service_error_meta:
|
|
52
|
-
expected_params:
|
|
53
|
-
response_meta:
|
|
54
|
-
modeled_fields:
|
|
49
|
+
service_error_meta: Mapping[str, Any] | None = ...,
|
|
50
|
+
expected_params: Mapping[str, Any] | None = ...,
|
|
51
|
+
response_meta: Mapping[str, Any] | None = ...,
|
|
52
|
+
modeled_fields: Mapping[str, Any] | None = ...,
|
|
55
53
|
) -> None: ...
|
|
56
54
|
def assert_no_pending_responses(self) -> None: ...
|
botocore-stubs/tokens.pyi
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
1
5
|
import datetime
|
|
2
6
|
import logging
|
|
3
|
-
from typing import Any, Callable, Iterable, NamedTuple
|
|
7
|
+
from typing import Any, Callable, Iterable, NamedTuple
|
|
4
8
|
|
|
5
9
|
from botocore.session import Session
|
|
6
10
|
from botocore.utils import JSONFileCache
|
|
@@ -11,7 +15,7 @@ def create_token_resolver(session: Session) -> TokenProviderChain: ...
|
|
|
11
15
|
|
|
12
16
|
class FrozenAuthToken(NamedTuple):
|
|
13
17
|
token: str
|
|
14
|
-
expiration:
|
|
18
|
+
expiration: datetime.datetime | None = ...
|
|
15
19
|
|
|
16
20
|
class DeferredRefreshableToken:
|
|
17
21
|
def __init__(
|
|
@@ -23,18 +27,18 @@ class DeferredRefreshableToken:
|
|
|
23
27
|
def get_frozen_token(self) -> FrozenAuthToken: ...
|
|
24
28
|
|
|
25
29
|
class TokenProviderChain:
|
|
26
|
-
def __init__(self, providers:
|
|
30
|
+
def __init__(self, providers: Iterable[Any] | None = ...) -> None: ...
|
|
27
31
|
def load_token(self) -> DeferredRefreshableToken: ...
|
|
28
32
|
|
|
29
33
|
class SSOTokenProvider:
|
|
30
34
|
METHOD: str = ...
|
|
31
|
-
DEFAULT_CACHE_CLS:
|
|
35
|
+
DEFAULT_CACHE_CLS: type[JSONFileCache] = ...
|
|
32
36
|
|
|
33
37
|
def __init__(
|
|
34
38
|
self,
|
|
35
39
|
session: Session,
|
|
36
|
-
cache:
|
|
40
|
+
cache: JSONFileCache | None = ...,
|
|
37
41
|
time_fetcher: Callable[[], datetime.datetime] = ...,
|
|
38
|
-
profile_name:
|
|
42
|
+
profile_name: str | None = ...,
|
|
39
43
|
) -> None: ...
|
|
40
44
|
def load_token(self) -> DeferredRefreshableToken: ...
|
botocore-stubs/translate.pyi
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import Any
|
|
2
6
|
|
|
3
7
|
from botocore.utils import merge_dicts as merge_dicts
|
|
4
8
|
|
|
@@ -6,6 +10,6 @@ def build_retry_config(
|
|
|
6
10
|
endpoint_prefix: str,
|
|
7
11
|
retry_model: Any,
|
|
8
12
|
definitions: Any,
|
|
9
|
-
client_retry_config:
|
|
13
|
+
client_retry_config: Any | None = ...,
|
|
10
14
|
) -> Any: ...
|
|
11
15
|
def resolve_references(config: Any, definitions: Any) -> None: ...
|
botocore-stubs/useragent.pyi
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Copyright 2024 Vlad Emelianov
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from typing import Any, NamedTuple, TypeVar
|
|
2
6
|
|
|
3
7
|
from botocore.config import Config
|
|
4
8
|
|
|
@@ -9,7 +13,7 @@ def sanitize_user_agent_string_component(raw_str: str, allow_hash: bool) -> str:
|
|
|
9
13
|
class UserAgentComponent(NamedTuple):
|
|
10
14
|
prefix: str
|
|
11
15
|
name: str
|
|
12
|
-
value:
|
|
16
|
+
value: str | None = ...
|
|
13
17
|
|
|
14
18
|
def to_string(self) -> str: ...
|
|
15
19
|
|
|
@@ -17,7 +21,7 @@ class RawStringUserAgentComponent:
|
|
|
17
21
|
def __init__(self, value: str) -> None: ...
|
|
18
22
|
def to_string(self) -> str: ...
|
|
19
23
|
|
|
20
|
-
def modify_components(components:
|
|
24
|
+
def modify_components(components: list[Any]) -> list[Any]: ...
|
|
21
25
|
|
|
22
26
|
class UserAgentString:
|
|
23
27
|
def __init__(
|
|
@@ -28,10 +32,10 @@ class UserAgentString:
|
|
|
28
32
|
python_version: str,
|
|
29
33
|
python_implementation: str,
|
|
30
34
|
execution_env: str,
|
|
31
|
-
crt_version:
|
|
35
|
+
crt_version: str | None = ...,
|
|
32
36
|
) -> None: ...
|
|
33
37
|
@classmethod
|
|
34
|
-
def from_environment(cls:
|
|
38
|
+
def from_environment(cls: type[_R]) -> _R: ...
|
|
35
39
|
def set_session_config(
|
|
36
40
|
self: _R,
|
|
37
41
|
session_user_agent_name: str,
|