Type annotations for boto3.Transfer 1.14.47 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-transfer
Type annotations for boto3.Transfer 1.14.47 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.2.0.
More information can be found on boto3-stubs page.
How to install
Make sure you have mypy installed and activated in your IDE.
Install boto3-stubs
for Transfer
service.
python -m pip install boto3-stubs[transfer]
How to use
Client annotations
TransferClient
provides annotations for boto3.client("transfer")
.
import boto3
from mypy_boto3_transfer import TransferClient
from mypy_boto3_transfer.paginator import ListServersPaginator
from mypy_boto3_transfer.type_defs import DescribedSecurityPolicyTypeDef, ...
client: TransferClient = boto3.client("transfer")
# now client usage is checked by mypy and IDE should provide code auto-complete
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: TransferClient = session.client("transfer")
Paginators annotations
mypy_boto3_transfer.paginator
module contains type annotations for all paginators.
client: TransferClient = boto3.client("transfer")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
list_servers_paginator: ListServersPaginator = client.get_paginator("list_servers")
Typed dictionations
mypy_boto3_transfer.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
def get_structure() -> DescribedSecurityPolicyTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_transfer
and other installed services.
# Run this command after you add or remove service packages
python -m mypy_boto3
Generated type annotations provide overloads for boto3.client
and boto3.resource
,
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 carefully if you have many services installedVSCode
does not currently support function overloads, use explicit type annotations
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("transfer")
session_client = boto3.Session().client("transfer")
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-transfer-1.14.47.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c3777d35027955102989253fe6becf83390bbca60f192bbefdc7bc5c5ba2dc3 |
|
MD5 | b7ce21352f06e9e2591e3223ae6082db |
|
BLAKE2b-256 | c9df4d75a32637c927d58e0803cbd7ec28bc0c661a711cc87e8f2c3940b7b777 |
Hashes for mypy_boto3_transfer-1.14.47.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb3e73c5bbc2da36d4a39bec66d3b3cee0a12c9dac74eaa092cc41248ee3ac66 |
|
MD5 | 13952bfbdae17d583b2611782b86147e |
|
BLAKE2b-256 | bb16debe0c75f5e3657690530d6472201eb9ea96bb01e5d2e77ab12e7a3e7aa4 |