Type annotations for boto3.DynamoDB 1.13.26 service, generated by mypy-boto3-buider 2.0.2
Project description
mypy-boto3-dynamodb
Type annotations for boto3.DynamoDB 1.13.26 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.26.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | af0cd88347e6724073423a1293fc9dc3adb66ebf2ac36fddb078416fa30b8cc2 |
|
MD5 | 8301fafcc15fedf03da3df11a88bec3e |
|
BLAKE2b-256 | f0dbae81cfcc896ef2f69e084edb26afbbb2576d8fb01f3acd39e6a5f6e7390a |
Hashes for mypy_boto3_dynamodb-1.13.26.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67fca608ce6d3ec2eca563b79992ac31d9f39fc15422bf316de63381d91edea0 |
|
MD5 | 6e1337efcdf471c7d20dbc7a2d0a1431 |
|
BLAKE2b-256 | 57743d5feb76b6ec286499bd847d9d327dbdc7ef5c024ca8160c69e66af00172 |