boto3-stubs-lite 1.28.70__py3-none-any.whl → 1.40.76__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 boto3-stubs-lite might be problematic. Click here for more details.
- boto3-stubs/__init__.pyi +39 -31
- boto3-stubs/compat.pyi +11 -4
- boto3-stubs/crt.pyi +28 -0
- boto3-stubs/docs/__init__.pyi +6 -0
- boto3-stubs/docs/action.pyi +37 -0
- boto3-stubs/docs/attr.pyi +33 -0
- boto3-stubs/docs/base.pyi +19 -0
- boto3-stubs/docs/client.pyi +9 -0
- boto3-stubs/docs/collection.pyi +37 -0
- boto3-stubs/docs/docstring.pyi +18 -0
- boto3-stubs/docs/method.pyi +27 -0
- boto3-stubs/docs/resource.pyi +20 -0
- boto3-stubs/docs/service.pyi +17 -0
- boto3-stubs/docs/subresource.pyi +22 -0
- boto3-stubs/docs/utils.pyi +16 -5
- boto3-stubs/docs/waiter.pyi +33 -0
- boto3-stubs/dynamodb/conditions.pyi +62 -67
- boto3-stubs/dynamodb/table.pyi +15 -9
- boto3-stubs/dynamodb/transform.pyi +18 -12
- boto3-stubs/dynamodb/types.pyi +22 -33
- boto3-stubs/ec2/createtags.pyi +9 -3
- boto3-stubs/ec2/deletetags.pyi +6 -0
- boto3-stubs/exceptions.pyi +6 -0
- boto3-stubs/resources/action.pyi +12 -6
- boto3-stubs/resources/base.pyi +18 -13
- boto3-stubs/resources/collection.pyi +10 -6
- boto3-stubs/resources/factory.pyi +9 -3
- boto3-stubs/resources/model.pyi +57 -53
- boto3-stubs/resources/params.pyi +12 -6
- boto3-stubs/resources/response.pyi +20 -14
- boto3-stubs/s3/constants.pyi +8 -0
- boto3-stubs/s3/inject.pyi +66 -56
- boto3-stubs/s3/transfer.pyi +30 -17
- boto3-stubs/session.pyi +42 -36
- boto3-stubs/utils.pyi +15 -10
- boto3_stubs_lite-1.40.76.dist-info/METADATA +2870 -0
- boto3_stubs_lite-1.40.76.dist-info/RECORD +45 -0
- {boto3_stubs_lite-1.28.70.dist-info → boto3_stubs_lite-1.40.76.dist-info}/WHEEL +1 -1
- {boto3_stubs_lite-1.28.70.dist-info → boto3_stubs_lite-1.40.76.dist-info/licenses}/LICENSE +1 -1
- {boto3_stubs_lite-1.28.70.dist-info → boto3_stubs_lite-1.40.76.dist-info}/top_level.txt +1 -0
- boto3_stubs_lite-1.28.70.dist-info/METADATA +0 -2553
- boto3_stubs_lite-1.28.70.dist-info/RECORD +0 -32
boto3-stubs/dynamodb/table.pyi
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for boto3.dynamodb.table module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
import logging
|
|
2
8
|
from types import TracebackType
|
|
3
|
-
from typing import Any,
|
|
9
|
+
from typing import Any, TypeVar
|
|
4
10
|
|
|
5
11
|
from botocore.client import BaseClient
|
|
6
12
|
|
|
7
13
|
logger: logging.Logger
|
|
8
14
|
|
|
9
|
-
def register_table_methods(base_classes:
|
|
15
|
+
def register_table_methods(base_classes: list[Any], **kwargs: Any) -> None: ...
|
|
10
16
|
|
|
11
17
|
class TableResource:
|
|
12
18
|
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
|
13
|
-
def batch_writer(self, overwrite_by_pkeys:
|
|
19
|
+
def batch_writer(self, overwrite_by_pkeys: list[str] | None = ...) -> BatchWriter: ...
|
|
14
20
|
|
|
15
21
|
_R = TypeVar("_R")
|
|
16
22
|
|
|
@@ -20,14 +26,14 @@ class BatchWriter:
|
|
|
20
26
|
table_name: str,
|
|
21
27
|
client: BaseClient,
|
|
22
28
|
flush_amount: int = ...,
|
|
23
|
-
overwrite_by_pkeys:
|
|
29
|
+
overwrite_by_pkeys: list[str] | None = ...,
|
|
24
30
|
) -> None: ...
|
|
25
|
-
def put_item(self, Item:
|
|
26
|
-
def delete_item(self, Key:
|
|
31
|
+
def put_item(self, Item: dict[str, Any]) -> None: ...
|
|
32
|
+
def delete_item(self, Key: dict[str, Any]) -> None: ...
|
|
27
33
|
def __enter__(self: _R) -> _R: ...
|
|
28
34
|
def __exit__(
|
|
29
35
|
self,
|
|
30
|
-
exc_type:
|
|
31
|
-
exc_value:
|
|
32
|
-
tb:
|
|
36
|
+
exc_type: type[BaseException] | None,
|
|
37
|
+
exc_value: BaseException | None,
|
|
38
|
+
tb: TracebackType | None,
|
|
33
39
|
) -> None: ...
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for boto3.dynamodb.transform module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Callable
|
|
2
8
|
|
|
3
9
|
from boto3.dynamodb.conditions import ConditionExpressionBuilder
|
|
4
10
|
from boto3.dynamodb.types import TypeDeserializer, TypeSerializer
|
|
5
11
|
from boto3.resources.model import ResourceModel
|
|
6
12
|
from botocore.model import Shape
|
|
7
13
|
|
|
8
|
-
def register_high_level_interface(base_classes:
|
|
14
|
+
def register_high_level_interface(base_classes: list[Any], **kwargs: Any) -> None: ...
|
|
9
15
|
def copy_dynamodb_params(params: Any, **kwargs: Any) -> Any: ...
|
|
10
16
|
|
|
11
17
|
class DynamoDBHighLevelResource:
|
|
@@ -14,27 +20,27 @@ class DynamoDBHighLevelResource:
|
|
|
14
20
|
class TransformationInjector:
|
|
15
21
|
def __init__(
|
|
16
22
|
self,
|
|
17
|
-
transformer:
|
|
18
|
-
condition_builder:
|
|
19
|
-
serializer:
|
|
20
|
-
deserializer:
|
|
23
|
+
transformer: ParameterTransformer | None = ...,
|
|
24
|
+
condition_builder: ConditionExpressionBuilder | None = ...,
|
|
25
|
+
serializer: TypeSerializer | None = ...,
|
|
26
|
+
deserializer: TypeDeserializer | None = ...,
|
|
21
27
|
) -> None: ...
|
|
22
28
|
def inject_condition_expressions(
|
|
23
|
-
self, params:
|
|
29
|
+
self, params: dict[str, Any], model: ResourceModel
|
|
24
30
|
) -> None: ...
|
|
25
31
|
def inject_attribute_value_input(
|
|
26
|
-
self, params:
|
|
32
|
+
self, params: dict[str, Any], model: ResourceModel
|
|
27
33
|
) -> None: ...
|
|
28
34
|
def inject_attribute_value_output(
|
|
29
|
-
self, parsed:
|
|
35
|
+
self, parsed: dict[str, Any], model: ResourceModel
|
|
30
36
|
) -> None: ...
|
|
31
37
|
|
|
32
38
|
class ConditionExpressionTransformation:
|
|
33
39
|
def __init__(
|
|
34
40
|
self,
|
|
35
41
|
condition_builder: ConditionExpressionBuilder,
|
|
36
|
-
placeholder_names:
|
|
37
|
-
placeholder_values:
|
|
42
|
+
placeholder_names: list[str],
|
|
43
|
+
placeholder_values: list[str],
|
|
38
44
|
is_key_condition: bool = ...,
|
|
39
45
|
) -> None: ...
|
|
40
46
|
def __call__(self, value: Any) -> Any: ...
|
|
@@ -42,7 +48,7 @@ class ConditionExpressionTransformation:
|
|
|
42
48
|
class ParameterTransformer:
|
|
43
49
|
def transform(
|
|
44
50
|
self,
|
|
45
|
-
params:
|
|
51
|
+
params: dict[str, Any],
|
|
46
52
|
model: Shape,
|
|
47
53
|
transformation: Callable[[Any], Any],
|
|
48
54
|
target_shape: str,
|
boto3-stubs/dynamodb/types.pyi
CHANGED
|
@@ -1,32 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for boto3.dynamodb.types module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
2
7
|
from decimal import Context
|
|
3
|
-
from typing import Any, Mapping, Sequence,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
{
|
|
17
|
-
"S": str,
|
|
18
|
-
"N": str,
|
|
19
|
-
"B": bytes,
|
|
20
|
-
"SS": Sequence[str],
|
|
21
|
-
"NS": Sequence[str],
|
|
22
|
-
"BS": Sequence[bytes],
|
|
23
|
-
"M": Mapping[str, Any],
|
|
24
|
-
"L": Sequence[Any],
|
|
25
|
-
"NULL": bool,
|
|
26
|
-
"BOOL": bool,
|
|
27
|
-
},
|
|
28
|
-
total=False,
|
|
29
|
-
)
|
|
8
|
+
from typing import Any, Literal, Mapping, Sequence, TypedDict
|
|
9
|
+
|
|
10
|
+
class _AttributeValueTypeDef(TypedDict, total=False):
|
|
11
|
+
S: str
|
|
12
|
+
N: str
|
|
13
|
+
B: bytes
|
|
14
|
+
SS: Sequence[str]
|
|
15
|
+
NS: Sequence[str]
|
|
16
|
+
BS: Sequence[bytes]
|
|
17
|
+
M: Mapping[str, Any]
|
|
18
|
+
L: Sequence[Any]
|
|
19
|
+
NULL: bool
|
|
20
|
+
BOOL: bool
|
|
30
21
|
|
|
31
22
|
STRING: Literal["S"]
|
|
32
23
|
NUMBER: Literal["N"]
|
|
@@ -41,14 +32,12 @@ LIST: Literal["L"]
|
|
|
41
32
|
|
|
42
33
|
DYNAMODB_CONTEXT: Context
|
|
43
34
|
|
|
44
|
-
BINARY_TYPES:
|
|
35
|
+
BINARY_TYPES: tuple[Any, ...]
|
|
45
36
|
|
|
46
37
|
class Binary:
|
|
47
38
|
def __init__(self, value: Any) -> None: ...
|
|
48
|
-
def __eq__(self, other:
|
|
49
|
-
def __ne__(self, other:
|
|
50
|
-
def __repr__(self) -> str: ...
|
|
51
|
-
def __str__(self) -> str: ...
|
|
39
|
+
def __eq__(self, other: object) -> bool: ...
|
|
40
|
+
def __ne__(self, other: object) -> bool: ...
|
|
52
41
|
def __bytes__(self) -> str: ...
|
|
53
42
|
def __hash__(self) -> int: ...
|
|
54
43
|
|
boto3-stubs/ec2/createtags.pyi
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for boto3.ec2.createtags module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Iterable
|
|
2
8
|
|
|
3
9
|
def inject_create_tags(
|
|
4
|
-
event_name: str, class_attributes:
|
|
10
|
+
event_name: str, class_attributes: dict[str, Any], **kwargs: Any
|
|
5
11
|
) -> None: ...
|
|
6
|
-
def create_tags(self: Any, **kwargs: Iterable[Any]) ->
|
|
12
|
+
def create_tags(self: Any, **kwargs: Iterable[Any]) -> list[dict[str, Any]]: ...
|
boto3-stubs/ec2/deletetags.pyi
CHANGED
boto3-stubs/exceptions.pyi
CHANGED
boto3-stubs/resources/action.pyi
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for boto3.resources.action module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
import logging
|
|
2
|
-
from typing import Any, Callable,
|
|
8
|
+
from typing import Any, Callable, Sequence
|
|
3
9
|
|
|
4
10
|
from boto3.resources.base import ServiceResource
|
|
5
11
|
from boto3.resources.collection import ResourceCollection
|
|
@@ -14,17 +20,17 @@ class ServiceAction:
|
|
|
14
20
|
def __init__(
|
|
15
21
|
self,
|
|
16
22
|
action_model: Action,
|
|
17
|
-
factory:
|
|
18
|
-
service_context:
|
|
23
|
+
factory: ResourceFactory | None = ...,
|
|
24
|
+
service_context: ServiceContext | None = ...,
|
|
19
25
|
) -> None: ...
|
|
20
26
|
def __call__(
|
|
21
27
|
self, parent: ServiceResource, *args: Any, **kwargs: Any
|
|
22
|
-
) ->
|
|
28
|
+
) -> ServiceResource | list[ServiceResource] | dict[str, Any]: ...
|
|
23
29
|
|
|
24
30
|
class BatchAction(ServiceAction):
|
|
25
31
|
def __call__( # type: ignore [override]
|
|
26
32
|
self, parent: ResourceCollection, *args: Any, **kwargs: Any
|
|
27
|
-
) ->
|
|
33
|
+
) -> list[dict[str, Any]]: ...
|
|
28
34
|
|
|
29
35
|
class WaiterAction:
|
|
30
36
|
def __init__(self, waiter_model: Waiter, waiter_resource_name: str) -> None: ...
|
|
@@ -34,7 +40,7 @@ class CustomModeledAction:
|
|
|
34
40
|
def __init__(
|
|
35
41
|
self,
|
|
36
42
|
action_name: str,
|
|
37
|
-
action_model:
|
|
43
|
+
action_model: dict[str, Any],
|
|
38
44
|
function: Callable[..., Any],
|
|
39
45
|
event_emitter: BaseEventHooks,
|
|
40
46
|
) -> None: ...
|
boto3-stubs/resources/base.pyi
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for boto3.resources.base module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
import logging
|
|
2
|
-
from typing import Any,
|
|
8
|
+
from typing import Any, TypeVar
|
|
3
9
|
|
|
4
10
|
from boto3.resources.model import ResourceModel
|
|
5
11
|
from botocore.client import BaseClient
|
|
@@ -13,23 +19,22 @@ class ResourceMeta:
|
|
|
13
19
|
def __init__(
|
|
14
20
|
self,
|
|
15
21
|
service_name: str,
|
|
16
|
-
identifiers:
|
|
17
|
-
client:
|
|
18
|
-
data:
|
|
19
|
-
resource_model:
|
|
22
|
+
identifiers: list[str] | None = ...,
|
|
23
|
+
client: BaseClient | None = ...,
|
|
24
|
+
data: dict[str, Any] | None = ...,
|
|
25
|
+
resource_model: ResourceModel | None = ...,
|
|
20
26
|
) -> None:
|
|
21
27
|
self.service_name: str
|
|
22
|
-
self.identifiers:
|
|
23
|
-
self.data:
|
|
28
|
+
self.identifiers: list[str]
|
|
29
|
+
self.data: dict[str, Any]
|
|
24
30
|
self.resource_model: ResourceModel
|
|
25
|
-
|
|
26
|
-
def __eq__(self, other:
|
|
31
|
+
|
|
32
|
+
def __eq__(self, other: object) -> bool: ...
|
|
27
33
|
def copy(self: _ResourceMeta) -> _ResourceMeta: ...
|
|
28
34
|
|
|
29
35
|
class ServiceResource:
|
|
30
|
-
meta: ResourceMeta # type: ignore
|
|
36
|
+
meta: ResourceMeta = ... # type: ignore
|
|
31
37
|
|
|
32
|
-
def __init__(self, *args: Any, client:
|
|
33
|
-
def
|
|
34
|
-
def __eq__(self, other: Any) -> bool: ...
|
|
38
|
+
def __init__(self, *args: Any, client: BaseClient | None = ..., **kwargs: Any) -> None: ...
|
|
39
|
+
def __eq__(self, other: object) -> bool: ...
|
|
35
40
|
def __hash__(self) -> int: ...
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for boto3.resources.collection module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
import logging
|
|
2
|
-
from typing import Any, Iterator,
|
|
8
|
+
from typing import Any, Iterator, TypeVar
|
|
3
9
|
|
|
4
10
|
from boto3.resources.base import ServiceResource
|
|
5
11
|
from boto3.resources.factory import ResourceFactory
|
|
@@ -10,15 +16,14 @@ from botocore.hooks import BaseEventHooks
|
|
|
10
16
|
|
|
11
17
|
logger: logging.Logger
|
|
12
18
|
|
|
13
|
-
_ResourceCollection = TypeVar("_ResourceCollection", bound=
|
|
19
|
+
_ResourceCollection = TypeVar("_ResourceCollection", bound=ResourceCollection)
|
|
14
20
|
|
|
15
21
|
class ResourceCollection:
|
|
16
22
|
def __init__(
|
|
17
23
|
self, model: Collection, parent: ServiceResource, handler: ResourceHandler, **kwargs: Any
|
|
18
24
|
) -> None: ...
|
|
19
|
-
def __repr__(self) -> str: ...
|
|
20
25
|
def __iter__(self) -> Iterator[Any]: ...
|
|
21
|
-
def pages(self) -> Iterator[
|
|
26
|
+
def pages(self) -> Iterator[list[Any]]: ...
|
|
22
27
|
def all(self: _ResourceCollection) -> _ResourceCollection: ...
|
|
23
28
|
def filter(self: _ResourceCollection, **kwargs: Any) -> _ResourceCollection: ...
|
|
24
29
|
def limit(self: _ResourceCollection, count: int) -> _ResourceCollection: ...
|
|
@@ -32,13 +37,12 @@ class CollectionManager:
|
|
|
32
37
|
factory: ResourceFactory,
|
|
33
38
|
service_context: ServiceContext,
|
|
34
39
|
) -> None: ...
|
|
35
|
-
def __repr__(self) -> str: ...
|
|
36
40
|
def iterator(self, **kwargs: Any) -> ResourceCollection: ...
|
|
37
41
|
def all(self) -> ResourceCollection: ...
|
|
38
42
|
def filter(self, **kwargs: Any) -> ResourceCollection: ...
|
|
39
43
|
def limit(self, count: int) -> ResourceCollection: ...
|
|
40
44
|
def page_size(self, count: InterruptedError) -> ResourceCollection: ...
|
|
41
|
-
def pages(self) ->
|
|
45
|
+
def pages(self) -> list[ServiceResource]: ...
|
|
42
46
|
|
|
43
47
|
class CollectionFactory:
|
|
44
48
|
def load_from_definition(
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for boto3.resources.factory module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
import logging
|
|
2
|
-
from typing import Any
|
|
8
|
+
from typing import Any
|
|
3
9
|
|
|
4
10
|
from boto3.resources.base import ServiceResource
|
|
5
11
|
from boto3.utils import ServiceContext
|
|
@@ -12,6 +18,6 @@ class ResourceFactory:
|
|
|
12
18
|
def load_from_definition(
|
|
13
19
|
self,
|
|
14
20
|
resource_name: str,
|
|
15
|
-
single_resource_json_definition:
|
|
21
|
+
single_resource_json_definition: dict[str, Any],
|
|
16
22
|
service_context: ServiceContext,
|
|
17
|
-
) ->
|
|
23
|
+
) -> type[ServiceResource]: ...
|
boto3-stubs/resources/model.pyi
CHANGED
|
@@ -1,69 +1,71 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for boto3.resources.model module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
1
7
|
import logging
|
|
2
|
-
import
|
|
3
|
-
from typing import Any, Dict, List, Optional, Tuple, Union
|
|
8
|
+
from typing import Any, Literal, TypedDict
|
|
4
9
|
|
|
5
10
|
from botocore.model import Shape
|
|
6
11
|
|
|
7
|
-
if sys.version_info >= (3, 12):
|
|
8
|
-
from typing import Literal
|
|
9
|
-
else:
|
|
10
|
-
from typing_extensions import Literal
|
|
11
|
-
if sys.version_info >= (3, 12):
|
|
12
|
-
from typing import TypedDict
|
|
13
|
-
else:
|
|
14
|
-
from typing_extensions import TypedDict
|
|
15
|
-
|
|
16
12
|
logger: logging.Logger
|
|
17
13
|
|
|
18
|
-
_ActionDefinition =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_DefinitionWithParamsDefinition =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
_RequestDefinition
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
14
|
+
class _ActionDefinition(TypedDict, total=False):
|
|
15
|
+
request: dict[str, Any]
|
|
16
|
+
resource: dict[str, Any]
|
|
17
|
+
path: str
|
|
18
|
+
|
|
19
|
+
class _DefinitionWithParamsDefinition(TypedDict, total=False):
|
|
20
|
+
params: list[dict[str, Any]]
|
|
21
|
+
|
|
22
|
+
class _RequestDefinition(TypedDict, total=False):
|
|
23
|
+
operation: str
|
|
24
|
+
|
|
25
|
+
class _WaiterDefinition(TypedDict, total=False):
|
|
26
|
+
waiterName: str
|
|
27
|
+
|
|
28
|
+
class _ResponseResourceDefinition(TypedDict, total=False):
|
|
29
|
+
type: str
|
|
30
|
+
path: str
|
|
31
|
+
|
|
32
|
+
class _ResourceModelDefinition(TypedDict, total=False):
|
|
33
|
+
shape: str
|
|
32
34
|
|
|
33
35
|
class Identifier:
|
|
34
|
-
def __init__(self, name: str, member_name:
|
|
36
|
+
def __init__(self, name: str, member_name: str | None = ...) -> None:
|
|
35
37
|
self.name: str
|
|
36
38
|
self.member_name: str
|
|
37
39
|
|
|
38
40
|
class Action:
|
|
39
41
|
def __init__(
|
|
40
|
-
self, name: str, definition: _ActionDefinition, resource_defs:
|
|
42
|
+
self, name: str, definition: _ActionDefinition, resource_defs: dict[str, dict[str, Any]]
|
|
41
43
|
) -> None:
|
|
42
44
|
self.name: str
|
|
43
|
-
self.request:
|
|
44
|
-
self.resource:
|
|
45
|
-
self.path:
|
|
45
|
+
self.request: Request | None
|
|
46
|
+
self.resource: ResponseResource | None
|
|
47
|
+
self.path: str | None
|
|
46
48
|
|
|
47
49
|
class DefinitionWithParams:
|
|
48
50
|
def __init__(self, definition: _DefinitionWithParamsDefinition) -> None: ...
|
|
49
51
|
@property
|
|
50
|
-
def params(self) ->
|
|
52
|
+
def params(self) -> list[Parameter]: ...
|
|
51
53
|
|
|
52
54
|
class Parameter:
|
|
53
55
|
def __init__(
|
|
54
56
|
self,
|
|
55
57
|
target: str,
|
|
56
58
|
source: str,
|
|
57
|
-
name:
|
|
58
|
-
path:
|
|
59
|
-
value:
|
|
59
|
+
name: str | None = ...,
|
|
60
|
+
path: str | None = ...,
|
|
61
|
+
value: str | float | bool | None = ...,
|
|
60
62
|
**kwargs: Any,
|
|
61
63
|
) -> None:
|
|
62
64
|
self.target: str
|
|
63
65
|
self.source: str
|
|
64
|
-
self.name:
|
|
65
|
-
self.path:
|
|
66
|
-
self.value:
|
|
66
|
+
self.name: str | None
|
|
67
|
+
self.path: str | None
|
|
68
|
+
self.value: str | int | float | bool | None
|
|
67
69
|
|
|
68
70
|
class Request(DefinitionWithParams):
|
|
69
71
|
def __init__(self, definition: _RequestDefinition) -> None:
|
|
@@ -77,43 +79,45 @@ class Waiter(DefinitionWithParams):
|
|
|
77
79
|
|
|
78
80
|
class ResponseResource:
|
|
79
81
|
def __init__(
|
|
80
|
-
self, definition: _ResponseResourceDefinition, resource_defs:
|
|
82
|
+
self, definition: _ResponseResourceDefinition, resource_defs: dict[str, dict[str, Any]]
|
|
81
83
|
) -> None:
|
|
82
84
|
self.type: str
|
|
83
85
|
self.path: str
|
|
86
|
+
|
|
84
87
|
@property
|
|
85
|
-
def identifiers(self) ->
|
|
88
|
+
def identifiers(self) -> list[Identifier]: ...
|
|
86
89
|
@property
|
|
87
|
-
def model(self) ->
|
|
90
|
+
def model(self) -> ResourceModel: ...
|
|
88
91
|
|
|
89
92
|
class Collection(Action):
|
|
90
93
|
@property
|
|
91
|
-
def batch_actions(self) ->
|
|
94
|
+
def batch_actions(self) -> list[Action]: ...
|
|
92
95
|
|
|
93
96
|
class ResourceModel:
|
|
94
97
|
def __init__(
|
|
95
98
|
self,
|
|
96
99
|
name: str,
|
|
97
100
|
definition: _ResourceModelDefinition,
|
|
98
|
-
resource_defs:
|
|
101
|
+
resource_defs: dict[str, dict[str, Any]],
|
|
99
102
|
) -> None:
|
|
100
103
|
self.name: str
|
|
101
|
-
self.shape:
|
|
102
|
-
|
|
103
|
-
def
|
|
104
|
+
self.shape: str | None
|
|
105
|
+
|
|
106
|
+
def load_rename_map(self, shape: Shape | None = ...) -> None: ...
|
|
107
|
+
def get_attributes(self, shape: Shape) -> dict[str, tuple[str, Shape]]: ...
|
|
104
108
|
@property
|
|
105
|
-
def identifiers(self) ->
|
|
109
|
+
def identifiers(self) -> list[Identifier]: ...
|
|
106
110
|
@property
|
|
107
|
-
def load(self) ->
|
|
111
|
+
def load(self) -> Action | None: ...
|
|
108
112
|
@property
|
|
109
|
-
def actions(self) ->
|
|
113
|
+
def actions(self) -> list[Action]: ...
|
|
110
114
|
@property
|
|
111
|
-
def batch_actions(self) ->
|
|
115
|
+
def batch_actions(self) -> list[Action]: ...
|
|
112
116
|
@property
|
|
113
|
-
def subresources(self) ->
|
|
117
|
+
def subresources(self) -> list[ResponseResource]: ...
|
|
114
118
|
@property
|
|
115
|
-
def references(self) ->
|
|
119
|
+
def references(self) -> list[Action]: ...
|
|
116
120
|
@property
|
|
117
|
-
def collections(self) ->
|
|
121
|
+
def collections(self) -> list[Collection]: ...
|
|
118
122
|
@property
|
|
119
|
-
def waiters(self) ->
|
|
123
|
+
def waiters(self) -> list[Waiter]: ...
|
boto3-stubs/resources/params.pyi
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for boto3.resources.params module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Pattern
|
|
2
8
|
|
|
3
9
|
from boto3.resources.base import ServiceResource
|
|
4
10
|
from boto3.resources.model import Request
|
|
5
11
|
|
|
6
12
|
INDEX_RE: Pattern[str]
|
|
7
13
|
|
|
8
|
-
def get_data_member(parent: ServiceResource, path: str) ->
|
|
14
|
+
def get_data_member(parent: ServiceResource, path: str) -> dict[str, Any] | None: ...
|
|
9
15
|
def create_request_parameters(
|
|
10
16
|
parent: ServiceResource,
|
|
11
17
|
request_model: Request,
|
|
12
|
-
params:
|
|
13
|
-
index:
|
|
14
|
-
) ->
|
|
18
|
+
params: dict[str, Any] | None = ...,
|
|
19
|
+
index: int | None = ...,
|
|
20
|
+
) -> dict[str, Any]: ...
|
|
15
21
|
def build_param_structure(
|
|
16
|
-
params:
|
|
22
|
+
params: dict[str, Any], target: str, value: Any, index: int | None = ...
|
|
17
23
|
) -> None: ...
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"""
|
|
2
|
+
Type annotations for boto3.resources.response module.
|
|
3
|
+
|
|
4
|
+
Copyright 2024 Vlad Emelianov
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Iterable
|
|
2
8
|
|
|
3
9
|
from boto3.resources.base import ServiceResource
|
|
4
10
|
from boto3.resources.factory import ResourceFactory
|
|
@@ -8,20 +14,20 @@ from botocore.model import ServiceModel
|
|
|
8
14
|
|
|
9
15
|
def all_not_none(iterable: Iterable[Any]) -> bool: ...
|
|
10
16
|
def build_identifiers(
|
|
11
|
-
identifiers:
|
|
17
|
+
identifiers: list[Parameter],
|
|
12
18
|
parent: ServiceResource,
|
|
13
|
-
params:
|
|
14
|
-
raw_response:
|
|
15
|
-
) ->
|
|
19
|
+
params: dict[str, Any] | None = ...,
|
|
20
|
+
raw_response: dict[str, Any] | None = ...,
|
|
21
|
+
) -> list[tuple[str, Any]]: ...
|
|
16
22
|
def build_empty_response(
|
|
17
23
|
search_path: str, operation_name: str, service_model: ServiceModel
|
|
18
|
-
) ->
|
|
24
|
+
) -> dict[str, Any] | list[Any] | None: ...
|
|
19
25
|
|
|
20
26
|
class RawHandler:
|
|
21
27
|
def __init__(self, search_path: str) -> None: ...
|
|
22
28
|
def __call__(
|
|
23
|
-
self, parent: ServiceResource, params:
|
|
24
|
-
) ->
|
|
29
|
+
self, parent: ServiceResource, params: dict[str, Any], response: dict[str, Any]
|
|
30
|
+
) -> dict[str, Any]: ...
|
|
25
31
|
|
|
26
32
|
class ResourceHandler:
|
|
27
33
|
def __init__(
|
|
@@ -30,15 +36,15 @@ class ResourceHandler:
|
|
|
30
36
|
factory: ResourceFactory,
|
|
31
37
|
resource_model: ResponseResource,
|
|
32
38
|
service_context: ServiceContext,
|
|
33
|
-
operation_name:
|
|
39
|
+
operation_name: str | None = ...,
|
|
34
40
|
) -> None: ...
|
|
35
41
|
def __call__(
|
|
36
|
-
self, parent: ServiceResource, params:
|
|
37
|
-
) ->
|
|
42
|
+
self, parent: ServiceResource, params: dict[str, Any], response: dict[str, Any]
|
|
43
|
+
) -> ServiceResource | list[ServiceResource]: ...
|
|
38
44
|
def handle_response_item(
|
|
39
45
|
self,
|
|
40
|
-
resource_cls:
|
|
46
|
+
resource_cls: type[ServiceResource],
|
|
41
47
|
parent: ServiceResource,
|
|
42
|
-
identifiers:
|
|
43
|
-
resource_data:
|
|
48
|
+
identifiers: dict[str, Any],
|
|
49
|
+
resource_data: dict[str, Any] | None,
|
|
44
50
|
) -> ServiceResource: ...
|