Type annotations for boto3.ServiceDiscovery 1.14.0 service, generated by mypy-boto3-buider 2.0.4
Project description
mypy-boto3-servicediscovery
Type annotations for boto3.ServiceDiscovery 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 ServiceDiscovery
service.
python -m pip install boto3-stubs[servicediscovery]
Use boto3
with mypy_boto3_servicediscovery
in your project and enjoy type checking and auto-complete.
import boto3
from mypy_boto3_servicediscovery import ServiceDiscoveryClient
# Now mypy can check if your code is valid.
client: ServiceDiscoveryClient = boto3.client("servicediscovery")
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: ServiceDiscoveryClient = session.client("servicediscovery")
# Annotated paginators are included as well
import mypy_boto3_servicediscovery.paginator as servicediscovery_paginators
list_instances_paginator: servicediscovery_paginators.ListInstancesPaginator = client.get_paginator("list_instances")
list_namespaces_paginator: servicediscovery_paginators.ListNamespacesPaginator = client.get_paginator("list_namespaces")
list_operations_paginator: servicediscovery_paginators.ListOperationsPaginator = client.get_paginator("list_operations")
list_services_paginator: servicediscovery_paginators.ListServicesPaginator = client.get_paginator("list_services")
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_servicediscovery
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("servicediscovery")
session_client = boto3.Session().client("servicediscovery")
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-servicediscovery-1.14.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8723459d697de3d3c0451a66dd7a45d22635c364d8c7a44f3bc8d0e8a8a94c9e |
|
MD5 | 73b61a945f21a9305903878392a898d6 |
|
BLAKE2b-256 | dfaa406bc253b4b4a0fa403304dba16401c77bc6a00c7a8d7a411c852617eb36 |
Hashes for mypy_boto3_servicediscovery-1.14.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27c4046904be095bbdfee1aa2bc39d01931e7c0db30bb95a21321641ced33974 |
|
MD5 | 1be10c7210f1a415da3e07663cb3e480 |
|
BLAKE2b-256 | 96f65cdd6f91ccb77ca28c4b52995d76f0215b70692d6850972ec0500607acd8 |