types-boto3-lite 1.35.99__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- boto3-stubs/__init__.pyi +62 -0
- boto3-stubs/compat.pyi +13 -0
- boto3-stubs/crt.pyi +28 -0
- boto3-stubs/docs/__init__.pyi +9 -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 +30 -0
- boto3-stubs/docs/waiter.pyi +33 -0
- boto3-stubs/dynamodb/__init__.pyi +0 -0
- boto3-stubs/dynamodb/conditions.pyi +136 -0
- boto3-stubs/dynamodb/table.pyi +39 -0
- boto3-stubs/dynamodb/transform.pyi +55 -0
- boto3-stubs/dynamodb/types.pyi +48 -0
- boto3-stubs/ec2/__init__.pyi +0 -0
- boto3-stubs/ec2/createtags.pyi +12 -0
- boto3-stubs/ec2/deletetags.pyi +12 -0
- boto3-stubs/exceptions.pyi +46 -0
- boto3-stubs/py.typed +0 -0
- boto3-stubs/resources/__init__.pyi +0 -0
- boto3-stubs/resources/action.pyi +53 -0
- boto3-stubs/resources/base.pyi +40 -0
- boto3-stubs/resources/collection.pyi +54 -0
- boto3-stubs/resources/factory.pyi +23 -0
- boto3-stubs/resources/model.pyi +123 -0
- boto3-stubs/resources/params.pyi +23 -0
- boto3-stubs/resources/response.pyi +50 -0
- boto3-stubs/s3/__init__.pyi +0 -0
- boto3-stubs/s3/constants.pyi +8 -0
- boto3-stubs/s3/inject.pyi +145 -0
- boto3-stubs/s3/transfer.pyi +90 -0
- boto3-stubs/session.pyi +78 -0
- boto3-stubs/utils.pyi +28 -0
- types_boto3_lite-1.35.99.dist-info/LICENSE +21 -0
- types_boto3_lite-1.35.99.dist-info/METADATA +2834 -0
- types_boto3_lite-1.35.99.dist-info/RECORD +45 -0
- types_boto3_lite-1.35.99.dist-info/WHEEL +5 -0
- types_boto3_lite-1.35.99.dist-info/top_level.txt +1 -0
boto3-stubs/__init__.pyi
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3 module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
import logging
|
8
|
+
|
9
|
+
from boto3 import session as session
|
10
|
+
from boto3.resources.base import ServiceResource
|
11
|
+
from boto3.session import Session as Session
|
12
|
+
from botocore.client import BaseClient
|
13
|
+
from botocore.config import Config
|
14
|
+
from botocore.session import Session as BotocoreSession
|
15
|
+
|
16
|
+
__author__: str = ...
|
17
|
+
__version__: str = ...
|
18
|
+
|
19
|
+
DEFAULT_SESSION: Session | None = ...
|
20
|
+
|
21
|
+
def setup_default_session(
|
22
|
+
*,
|
23
|
+
aws_access_key_id: str | None = ...,
|
24
|
+
aws_secret_access_key: str | None = ...,
|
25
|
+
aws_session_token: str | None = ...,
|
26
|
+
region_name: str | None = ...,
|
27
|
+
botocore_session: BotocoreSession | None = ...,
|
28
|
+
profile_name: str | None = ...,
|
29
|
+
) -> None: ...
|
30
|
+
def set_stream_logger(
|
31
|
+
name: str = ...,
|
32
|
+
level: int = ...,
|
33
|
+
format_string: str | None = ...,
|
34
|
+
) -> None: ...
|
35
|
+
def _get_default_session() -> Session: ...
|
36
|
+
|
37
|
+
class NullHandler(logging.Handler): ...
|
38
|
+
|
39
|
+
def client(
|
40
|
+
service_name: str,
|
41
|
+
region_name: str | None = ...,
|
42
|
+
api_version: str | None = ...,
|
43
|
+
use_ssl: bool | None = ...,
|
44
|
+
verify: bool | str | None = ...,
|
45
|
+
endpoint_url: str | None = ...,
|
46
|
+
aws_access_key_id: str | None = ...,
|
47
|
+
aws_secret_access_key: str | None = ...,
|
48
|
+
aws_session_token: str | None = ...,
|
49
|
+
config: Config | None = ...,
|
50
|
+
) -> BaseClient: ...
|
51
|
+
def resource(
|
52
|
+
service_name: str,
|
53
|
+
region_name: str | None = ...,
|
54
|
+
api_version: str | None = ...,
|
55
|
+
use_ssl: bool | None = ...,
|
56
|
+
verify: bool | str | None = ...,
|
57
|
+
endpoint_url: str | None = ...,
|
58
|
+
aws_access_key_id: str | None = ...,
|
59
|
+
aws_secret_access_key: str | None = ...,
|
60
|
+
aws_session_token: str | None = ...,
|
61
|
+
config: Config | None = ...,
|
62
|
+
) -> ServiceResource: ...
|
boto3-stubs/compat.pyi
ADDED
boto3-stubs/crt.pyi
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.crt module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
import threading
|
8
|
+
from typing import Any
|
9
|
+
|
10
|
+
from botocore.client import BaseClient
|
11
|
+
from s3transfer.crt import BotocoreCRTRequestSerializer, CRTTransferManager
|
12
|
+
|
13
|
+
CRT_S3_CLIENT: CRTS3Client | None = ...
|
14
|
+
BOTOCORE_CRT_SERIALIZER: BotocoreCRTRequestSerializer | None = ...
|
15
|
+
|
16
|
+
CLIENT_CREATION_LOCK: threading.Lock = ...
|
17
|
+
PROCESS_LOCK_NAME: str = ...
|
18
|
+
|
19
|
+
def get_crt_s3_client(client: BaseClient, config: Any) -> CRTS3Client: ...
|
20
|
+
|
21
|
+
class CRTS3Client:
|
22
|
+
def __init__(
|
23
|
+
self, crt_client: Any, process_lock: Any, region: str, cred_provider: Any
|
24
|
+
) -> None: ...
|
25
|
+
|
26
|
+
def is_crt_compatible_request(client: BaseClient, crt_s3_client: CRTS3Client) -> bool: ...
|
27
|
+
def compare_identity(boto3_creds: Any, crt_s3_creds: Any) -> bool: ...
|
28
|
+
def create_crt_transfer_manager(client: BaseClient, config: Any) -> CRTTransferManager | None: ...
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.docs.action module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
from boto3.resources.model import Action
|
8
|
+
from botocore.docs.bcdoc.restdoc import DocumentStructure
|
9
|
+
from botocore.hooks import BaseEventHooks
|
10
|
+
from botocore.model import ServiceModel
|
11
|
+
|
12
|
+
from .base import NestedDocumenter
|
13
|
+
|
14
|
+
PUT_DATA_WARNING_MESSAGE: str
|
15
|
+
WARNING_MESSAGES: dict[str, dict[str, str]]
|
16
|
+
IGNORE_PARAMS: dict[str, dict[str, list[str]]]
|
17
|
+
|
18
|
+
class ActionDocumenter(NestedDocumenter):
|
19
|
+
def document_actions(self, section: DocumentStructure) -> None: ...
|
20
|
+
|
21
|
+
def document_action(
|
22
|
+
section: DocumentStructure,
|
23
|
+
resource_name: str,
|
24
|
+
event_emitter: BaseEventHooks,
|
25
|
+
action_model: Action,
|
26
|
+
service_model: ServiceModel,
|
27
|
+
include_signature: bool = ...,
|
28
|
+
) -> None: ...
|
29
|
+
def document_load_reload_action(
|
30
|
+
section: DocumentStructure,
|
31
|
+
action_name: str,
|
32
|
+
resource_name: str,
|
33
|
+
event_emitter: BaseEventHooks,
|
34
|
+
load_model: Action,
|
35
|
+
service_model: ServiceModel,
|
36
|
+
include_signature: bool = ...,
|
37
|
+
) -> None: ...
|
@@ -0,0 +1,33 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.docs.attr module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
from boto3.resources.model import Identifier
|
8
|
+
from botocore.docs.bcdoc.restdoc import DocumentStructure
|
9
|
+
from botocore.docs.params import ResponseParamsDocumenter
|
10
|
+
from botocore.hooks import BaseEventHooks
|
11
|
+
from botocore.model import Shape
|
12
|
+
|
13
|
+
class ResourceShapeDocumenter(ResponseParamsDocumenter):
|
14
|
+
EVENT_NAME: str
|
15
|
+
|
16
|
+
def document_attribute(
|
17
|
+
section: DocumentStructure,
|
18
|
+
service_name: str,
|
19
|
+
resource_name: str,
|
20
|
+
attr_name: str,
|
21
|
+
event_emitter: BaseEventHooks,
|
22
|
+
attr_model: Shape,
|
23
|
+
include_signature: bool = True,
|
24
|
+
) -> None: ...
|
25
|
+
def document_identifier(
|
26
|
+
section: DocumentStructure,
|
27
|
+
resource_name: str,
|
28
|
+
identifier_model: Identifier,
|
29
|
+
include_signature: bool = ...,
|
30
|
+
) -> None: ...
|
31
|
+
def document_reference(
|
32
|
+
section: DocumentStructure, reference_model: Shape, include_signature: bool = ...
|
33
|
+
) -> None: ...
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.docs.base module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
from typing import Any
|
8
|
+
|
9
|
+
class BaseDocumenter:
|
10
|
+
member_map: dict[str, Any]
|
11
|
+
represents_service_resource: Any
|
12
|
+
def __init__(self, resource: Any) -> None: ...
|
13
|
+
@property
|
14
|
+
def class_name(self) -> str: ...
|
15
|
+
|
16
|
+
class NestedDocumenter(BaseDocumenter):
|
17
|
+
def __init__(self, resource: Any, root_docs_path: str) -> None: ...
|
18
|
+
@property
|
19
|
+
def class_name(self) -> str: ...
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.docs.collection module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
from boto3.resources.model import Action, Collection
|
8
|
+
from botocore.docs.bcdoc.restdoc import DocumentStructure
|
9
|
+
from botocore.hooks import BaseEventHooks
|
10
|
+
from botocore.model import ServiceModel
|
11
|
+
|
12
|
+
from .base import NestedDocumenter
|
13
|
+
|
14
|
+
class CollectionDocumenter(NestedDocumenter):
|
15
|
+
def document_collections(self, section: DocumentStructure) -> None: ...
|
16
|
+
|
17
|
+
def document_collection_object(
|
18
|
+
section: DocumentStructure, collection_model: Collection, include_signature: bool = ...
|
19
|
+
) -> None: ...
|
20
|
+
def document_batch_action(
|
21
|
+
section: DocumentStructure,
|
22
|
+
resource_name: str,
|
23
|
+
event_emitter: BaseEventHooks,
|
24
|
+
batch_action_model: Action,
|
25
|
+
service_model: ServiceModel,
|
26
|
+
collection_model: Collection,
|
27
|
+
include_signature: bool = ...,
|
28
|
+
) -> None: ...
|
29
|
+
def document_collection_method(
|
30
|
+
section: DocumentStructure,
|
31
|
+
resource_name: str,
|
32
|
+
action_name: str,
|
33
|
+
event_emitter: BaseEventHooks,
|
34
|
+
collection_model: Collection,
|
35
|
+
service_model: ServiceModel,
|
36
|
+
include_signature: bool = ...,
|
37
|
+
) -> None: ...
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.docs.docstring module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
from botocore.docs.docstring import LazyLoadedDocstring
|
8
|
+
|
9
|
+
class ActionDocstring(LazyLoadedDocstring): ...
|
10
|
+
class LoadReloadDocstring(LazyLoadedDocstring): ...
|
11
|
+
class SubResourceDocstring(LazyLoadedDocstring): ...
|
12
|
+
class AttributeDocstring(LazyLoadedDocstring): ...
|
13
|
+
class IdentifierDocstring(LazyLoadedDocstring): ...
|
14
|
+
class ReferenceDocstring(LazyLoadedDocstring): ...
|
15
|
+
class CollectionDocstring(LazyLoadedDocstring): ...
|
16
|
+
class CollectionMethodDocstring(LazyLoadedDocstring): ...
|
17
|
+
class BatchActionDocstring(LazyLoadedDocstring): ...
|
18
|
+
class ResourceWaiterDocstring(LazyLoadedDocstring): ...
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.docs.method module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
from typing import Any
|
8
|
+
|
9
|
+
from boto3.resources.model import Action
|
10
|
+
from botocore.docs.bcdoc.restdoc import DocumentStructure
|
11
|
+
from botocore.hooks import BaseEventHooks
|
12
|
+
|
13
|
+
def document_model_driven_resource_method(
|
14
|
+
section: DocumentStructure,
|
15
|
+
method_name: str,
|
16
|
+
operation_model: Any,
|
17
|
+
event_emitter: BaseEventHooks,
|
18
|
+
method_description: str | None = ...,
|
19
|
+
example_prefix: str | None = ...,
|
20
|
+
include_input: Any | None = ...,
|
21
|
+
include_output: Any | None = ...,
|
22
|
+
exclude_input: Any | None = ...,
|
23
|
+
exclude_output: Any | None = ...,
|
24
|
+
document_output: bool = ...,
|
25
|
+
resource_action_model: Action | None = ...,
|
26
|
+
include_signature: bool = ...,
|
27
|
+
) -> None: ...
|
@@ -0,0 +1,20 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.docs.resource module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
from typing import Any
|
8
|
+
|
9
|
+
from botocore.docs.bcdoc.restdoc import DocumentStructure
|
10
|
+
from botocore.session import Session
|
11
|
+
|
12
|
+
from .base import BaseDocumenter
|
13
|
+
|
14
|
+
class ResourceDocumenter(BaseDocumenter):
|
15
|
+
def __init__(self, resource: Any, botocore_session: Session, root_docs_path: str) -> None: ...
|
16
|
+
def document_resource(self, section: DocumentStructure) -> None: ...
|
17
|
+
|
18
|
+
class ServiceResourceDocumenter(ResourceDocumenter):
|
19
|
+
@property
|
20
|
+
def class_name(self) -> str: ...
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.docs.service module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
from botocore.docs.bcdoc.restdoc import DocumentStructure
|
8
|
+
from botocore.docs.service import ServiceDocumenter as BaseServiceDocumenter
|
9
|
+
from botocore.session import Session
|
10
|
+
|
11
|
+
class ServiceDocumenter(BaseServiceDocumenter):
|
12
|
+
EXAMPLE_PATH: str
|
13
|
+
sections: list[str]
|
14
|
+
def __init__(self, service_name: str, session: Session, root_docs_path: str) -> None: ...
|
15
|
+
def document_service(self) -> bytes: ...
|
16
|
+
def client_api(self, section: DocumentStructure) -> None: ...
|
17
|
+
def resource_section(self, section: DocumentStructure) -> None: ...
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.docs.subresource module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
from boto3.resources.model import ResourceModel
|
8
|
+
from botocore.docs.bcdoc.restdoc import DocumentStructure
|
9
|
+
from botocore.model import ServiceModel
|
10
|
+
|
11
|
+
from .base import NestedDocumenter
|
12
|
+
|
13
|
+
class SubResourceDocumenter(NestedDocumenter):
|
14
|
+
def document_sub_resources(self, section: DocumentStructure) -> None: ...
|
15
|
+
|
16
|
+
def document_sub_resource(
|
17
|
+
section: DocumentStructure,
|
18
|
+
resource_name: str,
|
19
|
+
sub_resource_model: ResourceModel,
|
20
|
+
service_model: ServiceModel,
|
21
|
+
include_signature: bool = ...,
|
22
|
+
) -> None: ...
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.docs.utils module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
from typing import Any, Iterable, Mapping
|
8
|
+
|
9
|
+
from botocore.docs.bcdoc.restdoc import DocumentStructure
|
10
|
+
|
11
|
+
def get_resource_ignore_params(params: Mapping[str, Any]) -> list[str]: ...
|
12
|
+
def is_resource_action(action_handle: Any) -> bool: ...
|
13
|
+
def get_resource_public_actions(resource_class: Any) -> list[Any]: ...
|
14
|
+
def get_identifier_values_for_example(identifier_names: Iterable[str]) -> str: ...
|
15
|
+
def get_identifier_args_for_signature(identifier_names: Iterable[str]) -> str: ...
|
16
|
+
def get_identifier_description(resource_name: str, identifier_name: str) -> str: ...
|
17
|
+
def add_resource_type_overview(
|
18
|
+
section: DocumentStructure,
|
19
|
+
resource_type: str,
|
20
|
+
description: str,
|
21
|
+
intro_link: str | None = ...,
|
22
|
+
) -> None: ...
|
23
|
+
|
24
|
+
class DocumentModifiedShape:
|
25
|
+
def __init__(
|
26
|
+
self, shape_name: str, new_type: str, new_description: str, new_example_value: str
|
27
|
+
) -> None: ...
|
28
|
+
def replace_documentation_for_matching_shape(
|
29
|
+
self, event_name: str, section: DocumentStructure, **kwargs: Any
|
30
|
+
) -> None: ...
|
@@ -0,0 +1,33 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.docs.waiter module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
from typing import Any
|
8
|
+
|
9
|
+
from botocore.docs.bcdoc.restdoc import DocumentStructure
|
10
|
+
from botocore.hooks import BaseEventHooks
|
11
|
+
from botocore.model import ServiceModel
|
12
|
+
from botocore.waiter import WaiterModel
|
13
|
+
|
14
|
+
from .base import NestedDocumenter
|
15
|
+
|
16
|
+
class WaiterResourceDocumenter(NestedDocumenter):
|
17
|
+
def __init__(
|
18
|
+
self,
|
19
|
+
resource: Any,
|
20
|
+
service_waiter_model: WaiterModel,
|
21
|
+
root_docs_path: str,
|
22
|
+
) -> None: ...
|
23
|
+
def document_resource_waiters(self, section: DocumentStructure) -> None: ...
|
24
|
+
|
25
|
+
def document_resource_waiter(
|
26
|
+
section: DocumentStructure,
|
27
|
+
resource_name: str,
|
28
|
+
event_emitter: BaseEventHooks,
|
29
|
+
service_model: ServiceModel,
|
30
|
+
resource_waiter_model: Any,
|
31
|
+
service_waiter_model: WaiterModel,
|
32
|
+
include_signature: bool = ...,
|
33
|
+
) -> None: ...
|
File without changes
|
@@ -0,0 +1,136 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.dynamodb.conditions module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
from typing import Any, Literal, NamedTuple, Pattern, TypedDict
|
8
|
+
|
9
|
+
ATTR_NAME_REGEX: Pattern[str]
|
10
|
+
|
11
|
+
class _ConditionBaseExpressionType(TypedDict):
|
12
|
+
format: str
|
13
|
+
operator: str
|
14
|
+
values: list[Any]
|
15
|
+
|
16
|
+
class ConditionBase:
|
17
|
+
expression_format: str
|
18
|
+
expression_operator: str
|
19
|
+
has_grouped_values: bool
|
20
|
+
def __init__(self, *values: Any) -> None: ...
|
21
|
+
def __and__(self, other: ConditionBase) -> And: ...
|
22
|
+
def __or__(self, other: ConditionBase) -> Or: ...
|
23
|
+
def __invert__(self) -> Not: ...
|
24
|
+
def get_expression(self) -> _ConditionBaseExpressionType: ...
|
25
|
+
def __eq__(self, other: object) -> bool: ...
|
26
|
+
def __ne__(self, other: object) -> bool: ...
|
27
|
+
|
28
|
+
class AttributeBase:
|
29
|
+
def __init__(self, name: str) -> None:
|
30
|
+
self.name: str = ...
|
31
|
+
|
32
|
+
def __and__(self, value: Any) -> Any: ...
|
33
|
+
def __or__(self, value: Any) -> Any: ...
|
34
|
+
def __invert__(self) -> Any: ...
|
35
|
+
def eq(self, value: Any) -> Equals: ...
|
36
|
+
def lt(self, value: Any) -> LessThan: ...
|
37
|
+
def lte(self, value: Any) -> LessThanEquals: ...
|
38
|
+
def gt(self, value: Any) -> GreaterThan: ...
|
39
|
+
def gte(self, value: Any) -> GreaterThanEquals: ...
|
40
|
+
def begins_with(self, value: Any) -> BeginsWith: ...
|
41
|
+
def between(self, low_value: Any, high_value: Any) -> Between: ...
|
42
|
+
def __eq__(self, other: object) -> bool: ...
|
43
|
+
def __ne__(self, other: object) -> bool: ...
|
44
|
+
|
45
|
+
class ConditionAttributeBase(ConditionBase, AttributeBase):
|
46
|
+
def __init__(self, *values: Any) -> None: ...
|
47
|
+
def __eq__(self, other: object) -> bool: ...
|
48
|
+
def __ne__(self, other: object) -> bool: ...
|
49
|
+
|
50
|
+
class ComparisonCondition(ConditionBase):
|
51
|
+
expression_format: Literal["{0} {operator} {1}"] # type: ignore [override]
|
52
|
+
|
53
|
+
class Equals(ComparisonCondition):
|
54
|
+
expression_operator: Literal["="] # type: ignore [override]
|
55
|
+
|
56
|
+
class NotEquals(ComparisonCondition):
|
57
|
+
expression_operator: Literal["<>"] # type: ignore [override]
|
58
|
+
|
59
|
+
class LessThan(ComparisonCondition):
|
60
|
+
expression_operator: Literal["<"] # type: ignore [override]
|
61
|
+
|
62
|
+
class LessThanEquals(ComparisonCondition):
|
63
|
+
expression_operator: Literal["<="] # type: ignore [override]
|
64
|
+
|
65
|
+
class GreaterThan(ComparisonCondition):
|
66
|
+
expression_operator: Literal[">"] # type: ignore [override]
|
67
|
+
|
68
|
+
class GreaterThanEquals(ComparisonCondition):
|
69
|
+
expression_operator: Literal[">="] # type: ignore [override]
|
70
|
+
|
71
|
+
class In(ComparisonCondition):
|
72
|
+
expression_operator: Literal["IN"] # type: ignore [override]
|
73
|
+
has_grouped_values: bool
|
74
|
+
|
75
|
+
class Between(ConditionBase):
|
76
|
+
expression_operator: Literal["BETWEEN"] # type: ignore [override]
|
77
|
+
expression_format: Literal["{0} {operator} {1} AND {2}"] # type: ignore [override]
|
78
|
+
|
79
|
+
class BeginsWith(ConditionBase):
|
80
|
+
expression_operator: Literal["begins_with"] # type: ignore [override]
|
81
|
+
expression_format: Literal["{operator}({0}, {1})"] # type: ignore [override]
|
82
|
+
|
83
|
+
class Contains(ConditionBase):
|
84
|
+
expression_operator: Literal["contains"] # type: ignore [override]
|
85
|
+
expression_format: Literal["{operator}({0}, {1})"] # type: ignore [override]
|
86
|
+
|
87
|
+
class Size(ConditionAttributeBase):
|
88
|
+
expression_operator: Literal["size"] # type: ignore [override]
|
89
|
+
expression_format: Literal["{operator}({0})"] # type: ignore [override]
|
90
|
+
|
91
|
+
class AttributeType(ConditionBase):
|
92
|
+
expression_operator: Literal["attribute_type"] # type: ignore [override]
|
93
|
+
expression_format: Literal["{operator}({0}, {1})"] # type: ignore [override]
|
94
|
+
|
95
|
+
class AttributeExists(ConditionBase):
|
96
|
+
expression_operator: Literal["attribute_exists"] # type: ignore [override]
|
97
|
+
expression_format: Literal["{operator}({0})"] # type: ignore [override]
|
98
|
+
|
99
|
+
class AttributeNotExists(ConditionBase):
|
100
|
+
expression_operator: Literal["attribute_not_exists"] # type: ignore [override]
|
101
|
+
expression_format: Literal["{operator}({0})"] # type: ignore [override]
|
102
|
+
|
103
|
+
class And(ConditionBase):
|
104
|
+
expression_operator: Literal["AND"] # type: ignore [override]
|
105
|
+
expression_format: Literal["({0} {operator} {1})"] # type: ignore [override]
|
106
|
+
|
107
|
+
class Or(ConditionBase):
|
108
|
+
expression_operator: Literal["OR"] # type: ignore [override]
|
109
|
+
expression_format: Literal["({0} {operator} {1})"] # type: ignore [override]
|
110
|
+
|
111
|
+
class Not(ConditionBase):
|
112
|
+
expression_operator: Literal["NOT"] # type: ignore [override]
|
113
|
+
expression_format: Literal["({operator} {0})"] # type: ignore [override]
|
114
|
+
|
115
|
+
class Key(AttributeBase): ...
|
116
|
+
|
117
|
+
class Attr(AttributeBase):
|
118
|
+
def ne(self, value: Any) -> NotEquals: ...
|
119
|
+
def is_in(self, value: Any) -> In: ...
|
120
|
+
def exists(self) -> AttributeExists: ...
|
121
|
+
def not_exists(self) -> AttributeNotExists: ...
|
122
|
+
def contains(self, value: Any) -> Contains: ...
|
123
|
+
def size(self) -> Size: ...
|
124
|
+
def attribute_type(self, value: Any) -> AttributeType: ...
|
125
|
+
|
126
|
+
class BuiltConditionExpression(NamedTuple):
|
127
|
+
condition_expression: str
|
128
|
+
attribute_name_placeholders: dict[str, str]
|
129
|
+
attribute_value_placeholders: dict[str, Any]
|
130
|
+
|
131
|
+
class ConditionExpressionBuilder:
|
132
|
+
def __init__(self) -> None: ...
|
133
|
+
def reset(self) -> None: ...
|
134
|
+
def build_expression(
|
135
|
+
self, condition: ConditionBase, is_key_condition: bool = ...
|
136
|
+
) -> BuiltConditionExpression: ...
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.dynamodb.table module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
import logging
|
8
|
+
from types import TracebackType
|
9
|
+
from typing import Any, TypeVar
|
10
|
+
|
11
|
+
from botocore.client import BaseClient
|
12
|
+
|
13
|
+
logger: logging.Logger
|
14
|
+
|
15
|
+
def register_table_methods(base_classes: list[Any], **kwargs: Any) -> None: ...
|
16
|
+
|
17
|
+
class TableResource:
|
18
|
+
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
19
|
+
def batch_writer(self, overwrite_by_pkeys: list[str] | None = ...) -> BatchWriter: ...
|
20
|
+
|
21
|
+
_R = TypeVar("_R")
|
22
|
+
|
23
|
+
class BatchWriter:
|
24
|
+
def __init__(
|
25
|
+
self,
|
26
|
+
table_name: str,
|
27
|
+
client: BaseClient,
|
28
|
+
flush_amount: int = ...,
|
29
|
+
overwrite_by_pkeys: list[str] | None = ...,
|
30
|
+
) -> None: ...
|
31
|
+
def put_item(self, Item: dict[str, Any]) -> None: ...
|
32
|
+
def delete_item(self, Key: dict[str, Any]) -> None: ...
|
33
|
+
def __enter__(self: _R) -> _R: ...
|
34
|
+
def __exit__(
|
35
|
+
self,
|
36
|
+
exc_type: type[BaseException] | None,
|
37
|
+
exc_value: BaseException | None,
|
38
|
+
tb: TracebackType | None,
|
39
|
+
) -> None: ...
|
@@ -0,0 +1,55 @@
|
|
1
|
+
"""
|
2
|
+
Type annotations for boto3.dynamodb.transform module.
|
3
|
+
|
4
|
+
Copyright 2024 Vlad Emelianov
|
5
|
+
"""
|
6
|
+
|
7
|
+
from typing import Any, Callable
|
8
|
+
|
9
|
+
from boto3.dynamodb.conditions import ConditionExpressionBuilder
|
10
|
+
from boto3.dynamodb.types import TypeDeserializer, TypeSerializer
|
11
|
+
from boto3.resources.model import ResourceModel
|
12
|
+
from botocore.model import Shape
|
13
|
+
|
14
|
+
def register_high_level_interface(base_classes: list[Any], **kwargs: Any) -> None: ...
|
15
|
+
def copy_dynamodb_params(params: Any, **kwargs: Any) -> Any: ...
|
16
|
+
|
17
|
+
class DynamoDBHighLevelResource:
|
18
|
+
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
|
19
|
+
|
20
|
+
class TransformationInjector:
|
21
|
+
def __init__(
|
22
|
+
self,
|
23
|
+
transformer: ParameterTransformer | None = ...,
|
24
|
+
condition_builder: ConditionExpressionBuilder | None = ...,
|
25
|
+
serializer: TypeSerializer | None = ...,
|
26
|
+
deserializer: TypeDeserializer | None = ...,
|
27
|
+
) -> None: ...
|
28
|
+
def inject_condition_expressions(
|
29
|
+
self, params: dict[str, Any], model: ResourceModel
|
30
|
+
) -> None: ...
|
31
|
+
def inject_attribute_value_input(
|
32
|
+
self, params: dict[str, Any], model: ResourceModel
|
33
|
+
) -> None: ...
|
34
|
+
def inject_attribute_value_output(
|
35
|
+
self, parsed: dict[str, Any], model: ResourceModel
|
36
|
+
) -> None: ...
|
37
|
+
|
38
|
+
class ConditionExpressionTransformation:
|
39
|
+
def __init__(
|
40
|
+
self,
|
41
|
+
condition_builder: ConditionExpressionBuilder,
|
42
|
+
placeholder_names: list[str],
|
43
|
+
placeholder_values: list[str],
|
44
|
+
is_key_condition: bool = ...,
|
45
|
+
) -> None: ...
|
46
|
+
def __call__(self, value: Any) -> Any: ...
|
47
|
+
|
48
|
+
class ParameterTransformer:
|
49
|
+
def transform(
|
50
|
+
self,
|
51
|
+
params: dict[str, Any],
|
52
|
+
model: Shape,
|
53
|
+
transformation: Callable[[Any], Any],
|
54
|
+
target_shape: str,
|
55
|
+
) -> None: ...
|