botocore-stubs 1.34.160__tar.gz → 1.42.2__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.
Potentially problematic release.
This version of botocore-stubs might be problematic. Click here for more details.
- botocore_stubs-1.42.2/MANIFEST.in +4 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/PKG-INFO +20 -22
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/README.md +2 -2
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/__init__.pyi +9 -2
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/args.pyi +42 -26
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/auth.pyi +43 -29
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/awsrequest.pyi +30 -24
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/client.pyi +49 -35
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/compat.pyi +28 -13
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/compress.pyi +9 -3
- botocore_stubs-1.42.2/botocore-stubs/config.pyi +72 -0
- botocore_stubs-1.42.2/botocore-stubs/configloader.pyi +12 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/configprovider.pyi +41 -28
- botocore_stubs-1.42.2/botocore-stubs/context.pyi +33 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/credentials.pyi +149 -97
- botocore_stubs-1.42.2/botocore-stubs/crt/__init__.pyi +7 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/crt/auth.pyi +19 -9
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/discovery.pyi +31 -14
- botocore_stubs-1.42.2/botocore-stubs/docs/__init__.pyi +11 -0
- botocore_stubs-1.42.2/botocore-stubs/docs/bcdoc/__init__.pyi +7 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/docs/bcdoc/docstringparser.pyi +13 -7
- botocore_stubs-1.42.2/botocore-stubs/docs/bcdoc/restdoc.pyi +61 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/docs/bcdoc/style.pyi +13 -7
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/docs/client.pyi +10 -4
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/docs/docstring.pyi +6 -2
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/docs/example.pyi +34 -25
- botocore_stubs-1.42.2/botocore-stubs/docs/method.pyi +45 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/docs/paginator.pyi +9 -2
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/docs/params.pyi +32 -22
- botocore_stubs-1.42.2/botocore-stubs/docs/service.pyi +20 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/docs/shape.pyi +12 -4
- botocore_stubs-1.42.2/botocore-stubs/docs/sharedexample.pyi +29 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/docs/translator.pyi +8 -2
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/docs/utils.pyi +15 -10
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/docs/waiter.pyi +8 -3
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/endpoint.pyi +25 -14
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/endpoint_provider.pyi +43 -42
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/errorfactory.pyi +9 -3
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/eventstream.pyi +23 -16
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/exceptions.pyi +18 -10
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/handlers.pyi +41 -15
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/history.pyi +8 -2
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/hooks.pyi +29 -22
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/httpchecksum.pyi +22 -12
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/httpsession.pyi +24 -17
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/loaders.pyi +20 -13
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/model.pyi +65 -44
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/monitoring.pyi +30 -22
- botocore_stubs-1.42.2/botocore-stubs/paginate.pyi +74 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/parsers.pyi +29 -7
- botocore_stubs-1.42.2/botocore-stubs/plugin.pyi +24 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/regions.pyi +38 -29
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/response.pyi +12 -4
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/retries/adaptive.pyi +7 -1
- botocore_stubs-1.42.2/botocore-stubs/retries/base.pyi +13 -0
- botocore_stubs-1.42.2/botocore-stubs/retries/bucket.pyi +24 -0
- botocore_stubs-1.42.2/botocore-stubs/retries/quota.pyi +15 -0
- botocore_stubs-1.42.2/botocore-stubs/retries/special.pyi +19 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/retries/standard.pyi +33 -24
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/retries/throttling.pyi +6 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/retryhandler.pyi +13 -6
- botocore_stubs-1.42.2/botocore-stubs/serialize.pyi +82 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/session.pyi +60 -55
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/signers.pyi +41 -26
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/stub.pyi +16 -15
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/tokens.pyi +20 -6
- botocore_stubs-1.42.2/botocore-stubs/translate.pyi +18 -0
- botocore_stubs-1.42.2/botocore-stubs/useragent.pyi +63 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/utils.pyi +118 -82
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/validate.pyi +9 -2
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/waiter.pyi +12 -5
- botocore_stubs-1.42.2/botocore_stubs.egg-info/PKG-INFO +74 -0
- botocore_stubs-1.42.2/botocore_stubs.egg-info/SOURCES.txt +79 -0
- botocore_stubs-1.42.2/botocore_stubs.egg-info/dependency_links.txt +1 -0
- botocore_stubs-1.42.2/botocore_stubs.egg-info/requires.txt +4 -0
- botocore_stubs-1.42.2/botocore_stubs.egg-info/top_level.txt +1 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/pyproject.toml +73 -65
- botocore_stubs-1.42.2/setup.cfg +4 -0
- botocore_stubs-1.34.160/botocore-stubs/config.pyi +0 -60
- botocore_stubs-1.34.160/botocore-stubs/configloader.pyi +0 -6
- botocore_stubs-1.34.160/botocore-stubs/crt/__init__.pyi +0 -3
- botocore_stubs-1.34.160/botocore-stubs/docs/__init__.pyi +0 -7
- botocore_stubs-1.34.160/botocore-stubs/docs/bcdoc/__init__.pyi +0 -1
- botocore_stubs-1.34.160/botocore-stubs/docs/bcdoc/restdoc.pyi +0 -50
- botocore_stubs-1.34.160/botocore-stubs/docs/method.pyi +0 -37
- botocore_stubs-1.34.160/botocore-stubs/docs/service.pyi +0 -15
- botocore_stubs-1.34.160/botocore-stubs/docs/sharedexample.pyi +0 -14
- botocore_stubs-1.34.160/botocore-stubs/paginate.pyi +0 -59
- botocore_stubs-1.34.160/botocore-stubs/retries/base.pyi +0 -7
- botocore_stubs-1.34.160/botocore-stubs/retries/bucket.pyi +0 -20
- botocore_stubs-1.34.160/botocore-stubs/retries/quota.pyi +0 -9
- botocore_stubs-1.34.160/botocore-stubs/retries/special.pyi +0 -12
- botocore_stubs-1.34.160/botocore-stubs/serialize.pyi +0 -51
- botocore_stubs-1.34.160/botocore-stubs/translate.pyi +0 -11
- botocore_stubs-1.34.160/botocore-stubs/useragent.pyi +0 -42
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/LICENSE +0 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/py.typed +0 -0
- {botocore_stubs-1.34.160 → botocore_stubs-1.42.2}/botocore-stubs/retries/__init__.pyi +0 -0
|
@@ -1,45 +1,44 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: botocore-stubs
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.42.2
|
|
4
4
|
Summary: Type annotations and code completion for botocore
|
|
5
|
-
|
|
6
|
-
License: MIT
|
|
5
|
+
Author-email: Vlad Emelianov <vlad.emelianov.nz@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/youtype/botocore-stubs
|
|
8
|
+
Project-URL: Documentation, https://youtype.github.io/mypy_boto3_builder/
|
|
9
|
+
Project-URL: Repository, https://github.com/youtype/botocore-stubs
|
|
10
|
+
Project-URL: Changelog, https://github.com/youtype/botocore-stubs/releases
|
|
11
|
+
Project-URL: Issues, https://github.com/youtype/botocore-stubs/issues
|
|
7
12
|
Keywords: botocore,type-annotations,pyright,mypy,boto3
|
|
8
|
-
Author: Vlad Emelianov
|
|
9
|
-
Author-email: vlad.emelianov.nz@gmail.com
|
|
10
|
-
Requires-Python: >=3.8,<4.0
|
|
11
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
14
|
Classifier: Environment :: Console
|
|
13
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
14
15
|
Classifier: Natural Language :: English
|
|
15
16
|
Classifier: Operating System :: OS Independent
|
|
16
17
|
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.9
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
24
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
24
25
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
25
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
26
26
|
Classifier: Typing :: Stubs Only
|
|
27
|
-
|
|
28
|
-
Requires-
|
|
29
|
-
Requires-Dist: types-awscrt
|
|
30
|
-
Requires-Dist: typing-extensions (>=4.1.0) ; python_version < "3.9"
|
|
31
|
-
Project-URL: Bug Tracker, https://github.com/youtype/botocore-stubs/issues
|
|
32
|
-
Project-URL: Documentation, https://youtype.github.io/mypy_boto3_builder/
|
|
33
|
-
Project-URL: Repository, https://github.com/youtype/botocore-stubs
|
|
34
|
-
Project-URL: Source, https://github.com/youtype/botocore-stubs
|
|
27
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
28
|
+
Requires-Python: >=3.9
|
|
35
29
|
Description-Content-Type: text/markdown
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Requires-Dist: types-awscrt
|
|
32
|
+
Provides-Extra: botocore
|
|
33
|
+
Requires-Dist: botocore; extra == "botocore"
|
|
34
|
+
Dynamic: license-file
|
|
36
35
|
|
|
37
36
|
# botocore-stubs
|
|
38
37
|
|
|
39
38
|
[](https://pypi.org/project/botocore-stubs)
|
|
40
39
|
[](https://pypi.org/project/botocore)
|
|
41
40
|
[](https://pypi.org/project/botocore-stubs)
|
|
42
|
-
[](https://
|
|
41
|
+
[](https://pypistats.org/packages/botocore-stubs)
|
|
43
42
|
|
|
44
43
|

|
|
45
44
|
|
|
@@ -67,10 +66,9 @@ Use [mypy](https://github.com/python/mypy) or [pyright](https://github.com/micro
|
|
|
67
66
|
## Versioning
|
|
68
67
|
|
|
69
68
|
`botocore-stubs` version is the same as related `botocore` version and follows
|
|
70
|
-
[
|
|
69
|
+
[Python Packaging version specifiers](https://packaging.python.org/en/latest/specifications/version-specifiers/).
|
|
71
70
|
|
|
72
71
|
## Support and contributing
|
|
73
72
|
|
|
74
73
|
Please reports any bugs or request new features in
|
|
75
74
|
[botocore-stubs](https://github.com/youtype/botocore-stubs/issues/) repository.
|
|
76
|
-
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://pypi.org/project/botocore-stubs)
|
|
4
4
|
[](https://pypi.org/project/botocore)
|
|
5
5
|
[](https://pypi.org/project/botocore-stubs)
|
|
6
|
-
[](https://
|
|
6
|
+
[](https://pypistats.org/packages/botocore-stubs)
|
|
7
7
|
|
|
8
8
|

|
|
9
9
|
|
|
@@ -31,7 +31,7 @@ Use [mypy](https://github.com/python/mypy) or [pyright](https://github.com/micro
|
|
|
31
31
|
## Versioning
|
|
32
32
|
|
|
33
33
|
`botocore-stubs` version is the same as related `botocore` version and follows
|
|
34
|
-
[
|
|
34
|
+
[Python Packaging version specifiers](https://packaging.python.org/en/latest/specifications/version-specifiers/).
|
|
35
35
|
|
|
36
36
|
## Support and contributing
|
|
37
37
|
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore module.
|
|
3
|
+
|
|
4
|
+
Copyright 2025 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
import logging
|
|
2
|
-
from
|
|
8
|
+
from collections.abc import Mapping
|
|
9
|
+
from typing import Any, Callable
|
|
3
10
|
|
|
4
11
|
from botocore.session import Session
|
|
5
12
|
|
|
@@ -7,7 +14,7 @@ class NullHandler(logging.Handler):
|
|
|
7
14
|
def emit(self, record: Any) -> None: ...
|
|
8
15
|
|
|
9
16
|
log: logging.Logger
|
|
10
|
-
ScalarTypes:
|
|
17
|
+
ScalarTypes: tuple[str, ...]
|
|
11
18
|
BOTOCORE_ROOT: str
|
|
12
19
|
|
|
13
20
|
UNSIGNED: Any
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.args module.
|
|
3
|
+
|
|
4
|
+
Copyright 2025 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from collections.abc import Mapping
|
|
2
8
|
from logging import Logger
|
|
3
|
-
from typing import Any,
|
|
9
|
+
from typing import Any, Literal, TypedDict, TypeVar
|
|
4
10
|
|
|
5
11
|
from botocore.client import ClientEndpointBridge
|
|
6
12
|
from botocore.config import Config as Config
|
|
7
13
|
from botocore.configprovider import ConfigValueStore
|
|
14
|
+
from botocore.credentials import Credentials
|
|
8
15
|
from botocore.endpoint import Endpoint
|
|
9
16
|
from botocore.endpoint import EndpointCreator as EndpointCreator
|
|
17
|
+
from botocore.errorfactory import ClientExceptionsFactory
|
|
10
18
|
from botocore.hooks import BaseEventHooks
|
|
11
19
|
from botocore.loaders import Loader
|
|
12
20
|
from botocore.model import ServiceModel
|
|
@@ -15,16 +23,17 @@ from botocore.serialize import BaseRestSerializer
|
|
|
15
23
|
from botocore.signers import RequestSigner as RequestSigner
|
|
16
24
|
from botocore.useragent import UserAgentString
|
|
17
25
|
|
|
18
|
-
|
|
19
|
-
from typing import TypedDict
|
|
20
|
-
else:
|
|
21
|
-
from typing_extensions import TypedDict
|
|
26
|
+
_R = TypeVar("_R")
|
|
22
27
|
|
|
23
28
|
logger: Logger = ...
|
|
24
29
|
|
|
25
|
-
VALID_REGIONAL_ENDPOINTS_CONFIG:
|
|
26
|
-
LEGACY_GLOBAL_STS_REGIONS:
|
|
27
|
-
USERAGENT_APPID_MAXLEN: int
|
|
30
|
+
VALID_REGIONAL_ENDPOINTS_CONFIG: list[str] = ...
|
|
31
|
+
LEGACY_GLOBAL_STS_REGIONS: list[str] = ...
|
|
32
|
+
USERAGENT_APPID_MAXLEN: int = ...
|
|
33
|
+
VALID_REQUEST_CHECKSUM_CALCULATION_CONFIG: tuple[str, ...] = ...
|
|
34
|
+
VALID_RESPONSE_CHECKSUM_VALIDATION_CONFIG: tuple[str, ...] = ...
|
|
35
|
+
PRIORITY_ORDERED_SUPPORTED_PROTOCOLS: tuple[str, ...] = ...
|
|
36
|
+
VALID_ACCOUNT_ID_ENDPOINT_MODE_CONFIG: tuple[str, ...] = ...
|
|
28
37
|
|
|
29
38
|
class _GetClientArgsTypeDef(TypedDict):
|
|
30
39
|
serializer: BaseRestSerializer
|
|
@@ -35,46 +44,46 @@ class _GetClientArgsTypeDef(TypedDict):
|
|
|
35
44
|
service_model: ServiceModel
|
|
36
45
|
loader: Loader
|
|
37
46
|
client_config: Config
|
|
38
|
-
partition:
|
|
39
|
-
exceptions_factory:
|
|
47
|
+
partition: str | None
|
|
48
|
+
exceptions_factory: ClientExceptionsFactory
|
|
40
49
|
|
|
41
50
|
class ClientArgsCreator:
|
|
42
51
|
def __init__(
|
|
43
52
|
self,
|
|
44
53
|
event_emitter: BaseEventHooks,
|
|
45
|
-
user_agent:
|
|
54
|
+
user_agent: str,
|
|
46
55
|
response_parser_factory: ResponseParserFactory,
|
|
47
56
|
loader: Loader,
|
|
48
|
-
exceptions_factory:
|
|
57
|
+
exceptions_factory: ClientExceptionsFactory,
|
|
49
58
|
config_store: ConfigValueStore,
|
|
50
|
-
user_agent_creator:
|
|
59
|
+
user_agent_creator: UserAgentString | None = ...,
|
|
51
60
|
) -> None: ...
|
|
52
61
|
def get_client_args(
|
|
53
62
|
self,
|
|
54
63
|
service_model: ServiceModel,
|
|
55
64
|
region_name: str,
|
|
56
65
|
is_secure: bool,
|
|
57
|
-
endpoint_url:
|
|
58
|
-
verify:
|
|
59
|
-
credentials:
|
|
60
|
-
scoped_config:
|
|
61
|
-
client_config:
|
|
66
|
+
endpoint_url: str | None,
|
|
67
|
+
verify: str | bool | None,
|
|
68
|
+
credentials: Any | None,
|
|
69
|
+
scoped_config: Mapping[str, Any] | None,
|
|
70
|
+
client_config: Config | None,
|
|
62
71
|
endpoint_bridge: ClientEndpointBridge,
|
|
63
|
-
auth_token:
|
|
64
|
-
endpoints_ruleset_data:
|
|
65
|
-
partition_data:
|
|
72
|
+
auth_token: str | None = ...,
|
|
73
|
+
endpoints_ruleset_data: Mapping[str, Any] | None = ...,
|
|
74
|
+
partition_data: Mapping[str, Any] | None = ...,
|
|
66
75
|
) -> _GetClientArgsTypeDef: ...
|
|
67
76
|
def compute_client_args(
|
|
68
77
|
self,
|
|
69
78
|
service_model: ServiceModel,
|
|
70
|
-
client_config:
|
|
79
|
+
client_config: Config | None,
|
|
71
80
|
endpoint_bridge: ClientEndpointBridge,
|
|
72
81
|
region_name: str,
|
|
73
82
|
endpoint_url: str,
|
|
74
83
|
is_secure: bool,
|
|
75
|
-
scoped_config:
|
|
84
|
+
scoped_config: Mapping[str, Any] | None,
|
|
76
85
|
) -> Any: ...
|
|
77
|
-
def compute_s3_config(self, client_config:
|
|
86
|
+
def compute_s3_config(self, client_config: Config | None) -> dict[str, Any]: ...
|
|
78
87
|
def compute_endpoint_resolver_builtin_defaults(
|
|
79
88
|
self,
|
|
80
89
|
region_name: str,
|
|
@@ -83,4 +92,11 @@ class ClientArgsCreator:
|
|
|
83
92
|
endpoint_bridge: ClientEndpointBridge,
|
|
84
93
|
client_endpoint_url: str,
|
|
85
94
|
legacy_endpoint_url: str,
|
|
86
|
-
|
|
95
|
+
credentials: Credentials | None,
|
|
96
|
+
account_id_endpoint_mode: Literal["preferred", "disabled", "required"] | None,
|
|
97
|
+
) -> dict[str, Any]: ...
|
|
98
|
+
|
|
99
|
+
class ConfigObjectWrapper: ...
|
|
100
|
+
|
|
101
|
+
class ClientConfigString(str, ConfigObjectWrapper):
|
|
102
|
+
def __new__(cls: type[_R], value: Any = ...) -> _R: ...
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.auth module.
|
|
3
|
+
|
|
4
|
+
Copyright 2025 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from collections.abc import Iterable, Mapping
|
|
1
8
|
from http.client import HTTPMessage
|
|
2
9
|
from logging import Logger
|
|
3
|
-
from typing import Any
|
|
10
|
+
from typing import Any
|
|
4
11
|
from urllib.parse import SplitResult
|
|
5
12
|
|
|
6
13
|
from botocore.awsrequest import AWSRequest
|
|
@@ -12,41 +19,41 @@ from botocore.utils import IdentityCache
|
|
|
12
19
|
|
|
13
20
|
logger: Logger = ...
|
|
14
21
|
|
|
15
|
-
_CredentialsUnion = Union[Credentials, ReadOnlyCredentials]
|
|
16
|
-
|
|
17
22
|
EMPTY_SHA256_HASH: str
|
|
18
23
|
PAYLOAD_BUFFER: int
|
|
19
24
|
ISO8601: str
|
|
20
25
|
SIGV4_TIMESTAMP: str
|
|
21
|
-
SIGNED_HEADERS_BLACKLIST:
|
|
26
|
+
SIGNED_HEADERS_BLACKLIST: list[str]
|
|
22
27
|
UNSIGNED_PAYLOAD: str
|
|
23
28
|
STREAMING_UNSIGNED_PAYLOAD_TRAILER: str
|
|
24
29
|
|
|
25
30
|
class BaseSigner:
|
|
26
31
|
REQUIRES_REGION: bool = ...
|
|
27
32
|
REQUIRES_TOKEN: bool = ...
|
|
28
|
-
def add_auth(self, request: AWSRequest) ->
|
|
33
|
+
def add_auth(self, request: AWSRequest) -> AWSRequest | None: ...
|
|
29
34
|
|
|
30
35
|
class TokenSigner(BaseSigner):
|
|
31
36
|
def __init__(self, auth_token: str) -> None: ...
|
|
32
37
|
|
|
33
38
|
class SigV2Auth(BaseSigner):
|
|
34
|
-
def __init__(self, credentials:
|
|
35
|
-
self.credentials:
|
|
39
|
+
def __init__(self, credentials: Credentials | ReadOnlyCredentials) -> None:
|
|
40
|
+
self.credentials: Credentials | ReadOnlyCredentials
|
|
36
41
|
|
|
37
|
-
def calc_signature(self, request: AWSRequest, params: Mapping[str, Any]) ->
|
|
42
|
+
def calc_signature(self, request: AWSRequest, params: Mapping[str, Any]) -> tuple[str, str]: ...
|
|
38
43
|
def add_auth(self, request: AWSRequest) -> AWSRequest: ...
|
|
39
44
|
|
|
40
45
|
class SigV3Auth(BaseSigner):
|
|
41
|
-
def __init__(self, credentials:
|
|
42
|
-
self.credentials:
|
|
46
|
+
def __init__(self, credentials: Credentials | ReadOnlyCredentials) -> None:
|
|
47
|
+
self.credentials: Credentials | ReadOnlyCredentials
|
|
43
48
|
|
|
44
49
|
def add_auth(self, request: AWSRequest) -> None: ...
|
|
45
50
|
|
|
46
51
|
class SigV4Auth(BaseSigner):
|
|
47
52
|
REQUIRES_REGION: bool = ...
|
|
48
|
-
def __init__(
|
|
49
|
-
self
|
|
53
|
+
def __init__(
|
|
54
|
+
self, credentials: Credentials | ReadOnlyCredentials, service_name: str, region_name: str
|
|
55
|
+
) -> None:
|
|
56
|
+
self.credentials: Credentials | ReadOnlyCredentials
|
|
50
57
|
|
|
51
58
|
def headers_to_sign(self, request: AWSRequest) -> HTTPMessage: ...
|
|
52
59
|
def canonical_query_string(self, request: AWSRequest) -> str: ...
|
|
@@ -67,7 +74,7 @@ class S3ExpressAuth(S3SigV4Auth):
|
|
|
67
74
|
|
|
68
75
|
def __init__(
|
|
69
76
|
self,
|
|
70
|
-
credentials:
|
|
77
|
+
credentials: Credentials | ReadOnlyCredentials,
|
|
71
78
|
service_name: str,
|
|
72
79
|
region_name: str,
|
|
73
80
|
*,
|
|
@@ -81,7 +88,7 @@ class S3ExpressQueryAuth(S3ExpressAuth):
|
|
|
81
88
|
|
|
82
89
|
def __init__(
|
|
83
90
|
self,
|
|
84
|
-
credentials:
|
|
91
|
+
credentials: Credentials | ReadOnlyCredentials,
|
|
85
92
|
service_name: str,
|
|
86
93
|
region_name: str,
|
|
87
94
|
*,
|
|
@@ -93,7 +100,7 @@ class SigV4QueryAuth(SigV4Auth):
|
|
|
93
100
|
DEFAULT_EXPIRES: int = ...
|
|
94
101
|
def __init__(
|
|
95
102
|
self,
|
|
96
|
-
credentials:
|
|
103
|
+
credentials: Credentials | ReadOnlyCredentials,
|
|
97
104
|
service_name: str,
|
|
98
105
|
region_name: str,
|
|
99
106
|
expires: int = ...,
|
|
@@ -106,42 +113,42 @@ class S3SigV4PostAuth(SigV4Auth):
|
|
|
106
113
|
def add_auth(self, request: AWSRequest) -> None: ...
|
|
107
114
|
|
|
108
115
|
class HmacV1Auth(BaseSigner):
|
|
109
|
-
QSAOfInterest:
|
|
116
|
+
QSAOfInterest: list[str] = ...
|
|
110
117
|
def __init__(
|
|
111
118
|
self,
|
|
112
|
-
credentials:
|
|
113
|
-
service_name:
|
|
114
|
-
region_name:
|
|
119
|
+
credentials: Credentials | ReadOnlyCredentials,
|
|
120
|
+
service_name: str | None = ...,
|
|
121
|
+
region_name: str | None = ...,
|
|
115
122
|
) -> None:
|
|
116
|
-
self.credentials:
|
|
123
|
+
self.credentials: Credentials | ReadOnlyCredentials
|
|
117
124
|
|
|
118
125
|
def sign_string(self, string_to_sign: str) -> str: ...
|
|
119
126
|
def canonical_standard_headers(self, headers: Mapping[str, Any]) -> str: ...
|
|
120
127
|
def canonical_custom_headers(self, headers: Mapping[str, Any]) -> str: ...
|
|
121
|
-
def unquote_v(self, nv: str) ->
|
|
122
|
-
def canonical_resource(self, split: SplitResult, auth_path:
|
|
128
|
+
def unquote_v(self, nv: str) -> tuple[str, str] | str: ...
|
|
129
|
+
def canonical_resource(self, split: SplitResult, auth_path: str | None = ...) -> str: ...
|
|
123
130
|
def canonical_string(
|
|
124
131
|
self,
|
|
125
132
|
method: str,
|
|
126
133
|
split: SplitResult,
|
|
127
134
|
headers: Mapping[str, Any],
|
|
128
|
-
expires:
|
|
129
|
-
auth_path:
|
|
135
|
+
expires: int | None = ...,
|
|
136
|
+
auth_path: str | None = ...,
|
|
130
137
|
) -> Any: ...
|
|
131
138
|
def get_signature(
|
|
132
139
|
self,
|
|
133
140
|
method: str,
|
|
134
141
|
split: SplitResult,
|
|
135
142
|
headers: Mapping[str, Any],
|
|
136
|
-
expires:
|
|
137
|
-
auth_path:
|
|
143
|
+
expires: int | None = ...,
|
|
144
|
+
auth_path: str | None = ...,
|
|
138
145
|
) -> Any: ...
|
|
139
146
|
def add_auth(self, request: AWSRequest) -> None: ...
|
|
140
147
|
|
|
141
148
|
class HmacV1QueryAuth(HmacV1Auth):
|
|
142
149
|
DEFAULT_EXPIRES: int = ...
|
|
143
|
-
def __init__(self, credentials:
|
|
144
|
-
self.credentials:
|
|
150
|
+
def __init__(self, credentials: Credentials | ReadOnlyCredentials, expires: int = ...) -> None:
|
|
151
|
+
self.credentials: Credentials | ReadOnlyCredentials
|
|
145
152
|
|
|
146
153
|
class HmacV1PostAuth(HmacV1Auth):
|
|
147
154
|
def add_auth(self, request: AWSRequest) -> None: ...
|
|
@@ -149,4 +156,11 @@ class HmacV1PostAuth(HmacV1Auth):
|
|
|
149
156
|
class BearerAuth(TokenSigner):
|
|
150
157
|
def add_auth(self, request: AWSRequest) -> None: ...
|
|
151
158
|
|
|
152
|
-
|
|
159
|
+
def resolve_auth_type(auth_trait: Iterable[str]) -> str: ...
|
|
160
|
+
def resolve_auth_scheme_preference(
|
|
161
|
+
preference_list: Iterable[str], auth_options: Iterable[str]
|
|
162
|
+
) -> str: ...
|
|
163
|
+
|
|
164
|
+
AUTH_TYPE_MAPS: dict[str, type[BaseSigner]]
|
|
165
|
+
AUTH_TYPE_TO_SIGNATURE_VERSION: dict[str, str]
|
|
166
|
+
AUTH_PREF_TO_SIGNATURE_VERSION: dict[str, str]
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for botocore.awsrequest module.
|
|
3
|
+
|
|
4
|
+
Copyright 2025 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from collections.abc import Iterator, Mapping, MutableMapping
|
|
2
8
|
from logging import Logger
|
|
3
|
-
from typing import IO, Any,
|
|
9
|
+
from typing import IO, Any, TypeVar
|
|
4
10
|
|
|
5
11
|
from botocore.compat import HTTPHeaders as HTTPHeaders
|
|
6
12
|
from botocore.compat import HTTPResponse as HTTPResponse
|
|
@@ -20,15 +26,15 @@ class AWSHTTPResponse(HTTPResponse):
|
|
|
20
26
|
|
|
21
27
|
class AWSConnection:
|
|
22
28
|
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
23
|
-
self.response_class:
|
|
29
|
+
self.response_class: type[AWSHTTPResponse]
|
|
24
30
|
|
|
25
31
|
def close(self) -> None: ...
|
|
26
32
|
def request(
|
|
27
33
|
self,
|
|
28
34
|
method: str,
|
|
29
35
|
url: str,
|
|
30
|
-
body:
|
|
31
|
-
headers:
|
|
36
|
+
body: str | bytes | bytearray | IO[bytes] | IO[str] | None = ...,
|
|
37
|
+
headers: Mapping[str, Any] | None = ...,
|
|
32
38
|
*args: Any,
|
|
33
39
|
**kwargs: Any,
|
|
34
40
|
) -> HTTPConnection: ...
|
|
@@ -39,16 +45,16 @@ class AWSHTTPConnection(AWSConnection, HTTPConnection): ... # type: ignore [mis
|
|
|
39
45
|
class AWSHTTPSConnection(AWSConnection, VerifiedHTTPSConnection): ... # type: ignore [misc]
|
|
40
46
|
|
|
41
47
|
class AWSHTTPConnectionPool(HTTPConnectionPool):
|
|
42
|
-
ConnectionCls:
|
|
48
|
+
ConnectionCls: type[AWSHTTPConnection] # type: ignore [misc,assignment]
|
|
43
49
|
|
|
44
50
|
class AWSHTTPSConnectionPool(HTTPSConnectionPool):
|
|
45
|
-
ConnectionCls:
|
|
51
|
+
ConnectionCls: type[AWSHTTPSConnection] # type: ignore [misc,assignment]
|
|
46
52
|
|
|
47
53
|
def prepare_request_dict(
|
|
48
54
|
request_dict: Mapping[str, Any],
|
|
49
55
|
endpoint_url: str,
|
|
50
|
-
context:
|
|
51
|
-
user_agent:
|
|
56
|
+
context: Mapping[str, Any] | None = ...,
|
|
57
|
+
user_agent: str | None = ...,
|
|
52
58
|
) -> None: ...
|
|
53
59
|
def create_request_object(request_dict: Mapping[str, Any]) -> Any: ...
|
|
54
60
|
|
|
@@ -58,13 +64,13 @@ class AWSPreparedRequest:
|
|
|
58
64
|
method: str,
|
|
59
65
|
url: str,
|
|
60
66
|
headers: HTTPHeaders,
|
|
61
|
-
body:
|
|
67
|
+
body: str | bytes | bytearray | IO[bytes] | IO[str] | None,
|
|
62
68
|
stream_output: bool,
|
|
63
69
|
) -> None:
|
|
64
70
|
self.method: str
|
|
65
71
|
self.url: str
|
|
66
72
|
self.headers: HTTPHeaders
|
|
67
|
-
self.body:
|
|
73
|
+
self.body: str | bytes | bytearray | IO[bytes] | IO[str] | None
|
|
68
74
|
self.stream_output: bool
|
|
69
75
|
|
|
70
76
|
def reset_stream(self) -> None: ...
|
|
@@ -72,22 +78,22 @@ class AWSPreparedRequest:
|
|
|
72
78
|
class AWSRequest:
|
|
73
79
|
def __init__(
|
|
74
80
|
self,
|
|
75
|
-
method:
|
|
76
|
-
url:
|
|
77
|
-
headers:
|
|
78
|
-
data:
|
|
79
|
-
params:
|
|
80
|
-
auth_path:
|
|
81
|
+
method: str | None = ...,
|
|
82
|
+
url: str | None = ...,
|
|
83
|
+
headers: Mapping[str, Any] | None = ...,
|
|
84
|
+
data: Any | None = ...,
|
|
85
|
+
params: Mapping[str, Any] | None = ...,
|
|
86
|
+
auth_path: str | None = ...,
|
|
81
87
|
stream_output: bool = ...,
|
|
82
88
|
) -> None:
|
|
83
|
-
self.method:
|
|
84
|
-
self.url:
|
|
89
|
+
self.method: str | None
|
|
90
|
+
self.url: str | None
|
|
85
91
|
self.headers: HTTPHeaders
|
|
86
|
-
self.data:
|
|
87
|
-
self.params:
|
|
88
|
-
self.auth_path:
|
|
92
|
+
self.data: Any | None
|
|
93
|
+
self.params: dict[str, Any]
|
|
94
|
+
self.auth_path: str | None
|
|
89
95
|
self.stream_output: bool
|
|
90
|
-
self.context:
|
|
96
|
+
self.context: dict[str, Any]
|
|
91
97
|
|
|
92
98
|
def prepare(self) -> AWSPreparedRequest: ...
|
|
93
99
|
@property
|
|
@@ -111,7 +117,7 @@ class AWSResponse:
|
|
|
111
117
|
class _HeaderKey:
|
|
112
118
|
def __init__(self, key: str) -> None: ...
|
|
113
119
|
def __hash__(self) -> int: ...
|
|
114
|
-
def __eq__(self, other:
|
|
120
|
+
def __eq__(self, other: object) -> bool: ...
|
|
115
121
|
|
|
116
122
|
class HeadersDict(MutableMapping[str, str]):
|
|
117
123
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|