Type annotations for boto3.DynamoDB 1.13.24 service, generated by mypy-boto3-buider 2.0.2
Project description
mypy-boto3-dynamodb
Type annotations for boto3.DynamoDB 1.13.24 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.0.2.
More information can be found on boto3-stubs page.
How to use
Make sure you have mypy installed and activated in your IDE.
Install boto3-stubs
for DynamoDB
service.
python -m pip install boto3-stubs[dynamodb]
# update installed packages index for automated type discovery
python -m mypy_boto3
Use boto3
with mypy_boto3_dynamodb
in your project and enjoy type checking and auto-complete.
import boto3
from mypy_boto3_dynamodb import DynamoDBClient
# Now mypy can check if your code is valid.
client: DynamoDBClient = boto3.client("dynamodb")
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: DynamoDBClient = session.client("dynamodb")
# Do you prefer resource approach? We've got you covered!
from mypy_boto3_dynamodb import DynamoDBServiceResource
resource: dynamodb.DynamoDBServiceResource = boto3.resource("dynamodb")
# Waiters are also supported
import mypy_boto3_dynamodb.waiter as dynamodb_waiters
table_exists_waiter: dynamodb_waiters.TableExistsWaiter = client.get_waiter("table_exists")
table_not_exists_waiter: dynamodb_waiters.TableNotExistsWaiter = client.get_waiter("table_not_exists")
# Annotated paginators are included as well
import mypy_boto3_dynamodb.paginator as dynamodb_paginators
list_backups_paginator: dynamodb_paginators.ListBackupsPaginator = client.get_paginator("list_backups")
list_tables_paginator: dynamodb_paginators.ListTablesPaginator = client.get_paginator("list_tables")
list_tags_of_resource_paginator: dynamodb_paginators.ListTagsOfResourcePaginator = client.get_paginator("list_tags_of_resource")
query_paginator: dynamodb_paginators.QueryPaginator = client.get_paginator("query")
scan_paginator: dynamodb_paginators.ScanPaginator = client.get_paginator("scan")
Automated type discovery
mypy_boto3
package can generate index for mypy_boto3_dynamodb
and other installed services.
# Run this command when you add or remove service packages
python -m mypy_boto3
Generated index provides overloads for boto3.client
and boto3.service
,
boto3.Session.client
and boto3.Session.resource
functions,
so explicit type annotations are not needed.
mypy
supports function overloads as expectedPyCharm
also supports function overloads, but consumes a lot of RAM, use carefullyVSCode
does not currently support function overloads
Also, generated index allows you to import types from mypy_boto3
:
# you can replace imports
import mypy_boto3_dynamodb as dynamodb
from mypy_boto3_dynamodb import DynamoDBClient
# with these
from mypy_boto3 import dynamodb
from mypy_boto3.dynamodb import DynamoDBClient
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mypy-boto3-dynamodb-1.13.24.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d61ec42fa740bd80b0e4d9ac0215220ce4e7673c3edee9598f8d50dd2c70909 |
|
MD5 | 2830fe02be208ddcb46ea59cdc8060df |
|
BLAKE2b-256 | a7b5edca2b8cb350b6e6c426d7a7f0a046b029cc440970787d5324c0e04756dc |
Hashes for mypy_boto3_dynamodb-1.13.24.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f05f69dded870207ab379fb4b3d19128fc60ce348eb33853e7064e38d078d826 |
|
MD5 | 49bb224f0ba2c7662b149594c148d1a0 |
|
BLAKE2b-256 | bc3982c8078148264946efd39253b29ad560e5061d0f5684db76e753197e7c27 |