Type annotations for boto3.ServiceDiscovery 1.13.26 service, generated by mypy-boto3-buider 2.0.4
Project description
mypy-boto3-servicediscovery
Type annotations for boto3.ServiceDiscovery 1.13.26 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.13.26.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c74408cb10bb7cc1734ca1730b0c436b36e6cab55b6b51988349c94c53cb9a0f |
|
MD5 | de5565ed9e9bf0f523bf6a1e014ac704 |
|
BLAKE2b-256 | ec15282611b9440da44810a0cc5d69b4c98eb6cfbfb4c99bb72feab6b2de893b |
Hashes for mypy_boto3_servicediscovery-1.13.26.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfe37e3c976c145d40cfd559a7a4687f6451e82dd15789433f541269941081b5 |
|
MD5 | 9589d21c47695d61e50a70bc5b95d8ba |
|
BLAKE2b-256 | 5711639600f5e651299fb7d348ff1251e5495652596db22eebcf22e27e1e5479 |