Type annotations for boto3.Synthetics 1.14.6 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-synthetics
Type annotations for boto3.Synthetics 1.14.6 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.6.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4e311ef5c01c51e233239e33d546dad5317964e57c4b43f49a3ccb26d52ea5d |
|
MD5 | 7fb474ab615bb5c25eeec1e9ca3f2f76 |
|
BLAKE2b-256 | 078f905dba5f5ab8a6994bb4455d0a274c7aa80d0469d082157162b2f339888d |
Hashes for mypy_boto3_synthetics-1.14.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 213fafda89ed090f33bcfe3fe77b14ec38c6d509c697dcfbe034057bae015a37 |
|
MD5 | d3d0851389d31f4351b789da78064bff |
|
BLAKE2b-256 | d87a4cd6ca4ecdb7c53ecb47db8e2b8c01b0a4b767c8b61f24e123247748d3ea |