Type annotations for boto3.DynamoDB 1.13.25 service, generated by mypy-boto3-buider 2.0.2
Project description
mypy-boto3-dynamodb
Type annotations for boto3.DynamoDB 1.13.25 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.25.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa0bbde959a52fd59a87b828b34a45a305bfae33b475772bbfe3a852fe9e7c66 |
|
MD5 | 6266db34f10bb0c199f407055675f13a |
|
BLAKE2b-256 | 39d3f9a17083358646eeb234e96f23535bfe09af33201db48a52c093194467ef |
Hashes for mypy_boto3_dynamodb-1.13.25.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2526fedf2824c16de3aba1bd86b96c9103a8d2ea6a063a06780eb90925584f90 |
|
MD5 | 9253f87e78d7660476a4b5e4da32863b |
|
BLAKE2b-256 | 7a8c7e825402a0e0e8897b933523c0e064ed2c208b594adc48cf009ee862301a |