Type annotations for boto3.Synthetics 1.14.10 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-synthetics
Type annotations for boto3.Synthetics 1.14.10 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.2.0.
More information can be found on boto3-stubs page.
How to install
Make sure you have mypy installed and activated in your IDE.
Install boto3-stubs
for Synthetics
service.
python -m pip install boto3-stubs[synthetics]
How to use
Client annotations
SyntheticsClient
provides annotations for boto3.client("synthetics")
.
import boto3
from mypy_boto3_synthetics import SyntheticsClient
from mypy_boto3_synthetics.type_defs import CanaryCodeOutputTypeDef, ...
client: SyntheticsClient = boto3.client("synthetics")
# now client usage is checked by mypy and IDE should provide code auto-complete
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: SyntheticsClient = session.client("synthetics")
Typed dictionations
mypy_boto3_synthetics.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
def get_structure() -> CanaryCodeOutputTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_synthetics
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
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("synthetics")
session_client = boto3.Session().client("synthetics")
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-synthetics-1.14.10.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ee7dbde6cfe7d8f69afc87953e38e40e00b45a43484ed87681cae6cf36c0c21 |
|
MD5 | abd614624dfeb0a48560c77f3fc44ea8 |
|
BLAKE2b-256 | 136e91f5943165e562e8378e02219fd17af66b838acd4f79c9196a3467cdb148 |
Hashes for mypy_boto3_synthetics-1.14.10.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de2931f1834971f62e62562e61f60cc255405415e0fffa7d38df98f6183e27cd |
|
MD5 | 49f9dd669884e350708197513ea9a696 |
|
BLAKE2b-256 | aff8fa04a6981b8107f6f6cb2142167b9b96cb22b0a8440a2daee97c4bc3b309 |