Type annotations for boto3.Polly 1.14.0 service, generated by mypy-boto3-buider 2.0.4
Project description
mypy-boto3-polly
Type annotations for boto3.Polly 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 Polly
service.
python -m pip install boto3-stubs[polly]
Use boto3
with mypy_boto3_polly
in your project and enjoy type checking and auto-complete.
import boto3
from mypy_boto3_polly import PollyClient
# Now mypy can check if your code is valid.
client: PollyClient = boto3.client("polly")
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: PollyClient = session.client("polly")
# Annotated paginators are included as well
import mypy_boto3_polly.paginator as polly_paginators
describe_voices_paginator: polly_paginators.DescribeVoicesPaginator = client.get_paginator("describe_voices")
list_lexicons_paginator: polly_paginators.ListLexiconsPaginator = client.get_paginator("list_lexicons")
list_speech_synthesis_tasks_paginator: polly_paginators.ListSpeechSynthesisTasksPaginator = client.get_paginator("list_speech_synthesis_tasks")
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_polly
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("polly")
session_client = boto3.Session().client("polly")
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-polly-1.14.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffb16afc57a5846190900927fdc480b80ded0e34070a9cc4c8813d5507d37630 |
|
MD5 | 869b1df70e322e31290c39e9c3d62025 |
|
BLAKE2b-256 | b3b896cd7285a65b6be0cbb41a495f0e3afd91313eb08dd1bbec45703bc9d342 |
Hashes for mypy_boto3_polly-1.14.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aceff0d00915355999aa6433a527fdbaeda474c1d3156015aeab779db113ddd7 |
|
MD5 | 5e9574d4d82c7df6ba9d208cce781312 |
|
BLAKE2b-256 | c93572b4fd377b56d33c51a17ade0e1841e5b0d6b8ad98d83a2b31efde5f5839 |