Type annotations for boto3.DirectConnect 1.14.0 service, generated by mypy-boto3-buider 2.0.4
Project description
mypy-boto3-directconnect
Type annotations for boto3.DirectConnect 1.14.0 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.0.4.
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 DirectConnect
service.
python -m pip install boto3-stubs[directconnect]
Use boto3
with mypy_boto3_directconnect
in your project and enjoy type checking and auto-complete.
import boto3
from mypy_boto3_directconnect import DirectConnectClient
# Now mypy can check if your code is valid.
client: DirectConnectClient = boto3.client("directconnect")
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: DirectConnectClient = session.client("directconnect")
# Annotated paginators are included as well
import mypy_boto3_directconnect.paginator as directconnect_paginators
describe_direct_connect_gateway_associations_paginator: directconnect_paginators.DescribeDirectConnectGatewayAssociationsPaginator = client.get_paginator("describe_direct_connect_gateway_associations")
describe_direct_connect_gateway_attachments_paginator: directconnect_paginators.DescribeDirectConnectGatewayAttachmentsPaginator = client.get_paginator("describe_direct_connect_gateway_attachments")
describe_direct_connect_gateways_paginator: directconnect_paginators.DescribeDirectConnectGatewaysPaginator = client.get_paginator("describe_direct_connect_gateways")
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_directconnect
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
import boto3
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("directconnect")
session_client = boto3.Session().client("directconnect")
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-directconnect-1.14.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7043fd3ee025180e15995c5db90fd51d8dc4a20e2db8e855d43b6eb9ebce421a |
|
MD5 | 844b62a88c6f7689319ee61cf29dbbae |
|
BLAKE2b-256 | 2489585bcf59b9d7633eb932a381c1b797ce6bf0649b77ccf57932537c487d3f |
Hashes for mypy_boto3_directconnect-1.14.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cbbf607da2e28b24ead18bab69b30c81a3bb6a01a09774df414d0b97754671a |
|
MD5 | e12b486e7672a8c6ccbfac5edc7ee593 |
|
BLAKE2b-256 | f3132d7c394d3ec6c19267ea8b1529d65e1dabdf1402a586697459091bd0f088 |