Boto3 Utils#
Mypy_boto3_builder Index / Mypy Boto3 Builder / Utils / Boto3 Utils
Auto-generated documentation for mypy_boto3_builder.utils.boto3_utils module.
get_boto3_client#
Show source in boto3_utils.py:36
Get boto3 client from session
.
Arguments#
session
- boto3 session.service_name
- ServiceName instance.
Returns#
Boto3 client.
Signature#
See also#
get_boto3_resource#
Show source in boto3_utils.py:51
Get boto3 resource from session
.
Arguments#
session
- boto3 session.service_name
- ServiceName instance.
Returns#
Boto3 resource or None.
Signature#
@cache
def get_boto3_resource(
session: Session, service_name: ServiceName
) -> Boto3ServiceResource | None: ...
See also#
get_boto3_session#
Show source in boto3_utils.py:19
Create and cache boto3 session.
Signature#
get_botocore_session#
Show source in boto3_utils.py:29
Get botocore session from boto3 session.
Signature#
get_region_name_literal#
Show source in boto3_utils.py:69
Get Literal with all regions.
Arguments#
session
- boto3 session.service_names
- All available service names.
Returns#
TypeLiteral for region names.
Signature#
def get_region_name_literal(
session: Session, service_names: Iterable[ServiceName]
) -> TypeLiteral | None: ...