Type annotations for boto3.Polly 1.13.25 service, generated by mypy-boto3-buider 2.0.2
Project description
mypy-boto3-polly
Type annotations for boto3.Polly 1.13.25 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.0.2.
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]
# update installed packages index for automated type discovery
python -m mypy_boto3
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")
Automated type discovery
mypy_boto3
package can generate index for mypy_boto3_polly
and other installed services.
# Run this command when you add or remove service packages
python -m mypy_boto3
Generated index provides overloads for boto3.client
and boto3.service
,
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 carefullyVSCode
does not currently support function overloads
Also, generated index allows you to import types from mypy_boto3
:
# you can replace imports
import mypy_boto3_polly as polly
from mypy_boto3_polly import PollyClient
# with these
from mypy_boto3 import polly
from mypy_boto3.polly import PollyClient
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.13.25.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc7079096e7c8c55783919fe8f546d926a12e0b28439e5ad93e2b5f348643308 |
|
MD5 | ef71f67f48645dfa0dc203fb9748ffee |
|
BLAKE2b-256 | 0e75143cc0885bdcbc4018a2f43c17733ac78f0a52c41e9a2b5c941720a98a13 |
Hashes for mypy_boto3_polly-1.13.25.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f30ec650a3c5ef8cf4fd489a867f85636a92e1c80a0cdf978ba7199ed3dc8cc0 |
|
MD5 | 0409e7ecb0b5a3c84177a3322640e02c |
|
BLAKE2b-256 | 27b6c89fbf3d13f6d6f11d189729e04052ff249797e594de9e5d692885ab0b34 |