Type annotations for boto3.CognitoSync 1.14.12 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-cognito-sync
Type annotations for boto3.CognitoSync 1.14.12 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 CognitoSync
service.
python -m pip install boto3-stubs[cognito-sync]
How to use
Client annotations
CognitoSyncClient
provides annotations for boto3.client("cognito-sync")
.
import boto3
from mypy_boto3_cognito_sync import CognitoSyncClient
from mypy_boto3_cognito_sync.type_defs import CognitoStreamsTypeDef, ...
client: CognitoSyncClient = boto3.client("cognito-sync")
# 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: CognitoSyncClient = session.client("cognito-sync")
Typed dictionations
mypy_boto3_cognito_sync.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
def get_structure() -> CognitoStreamsTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_cognito_sync
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("cognito-sync")
session_client = boto3.Session().client("cognito-sync")
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-cognito-sync-1.14.12.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 756d0d7c793594197e051f9235e7431003238f8079e72c08d8b4096b69f82685 |
|
MD5 | 1b8f5690f3aeb77c367f2e68ef696487 |
|
BLAKE2b-256 | 8c3073ca03e122f7d27c9da14b7406ec0a8b798e89ad2d2122858d763e0bbe37 |
Hashes for mypy_boto3_cognito_sync-1.14.12.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 094e0667bee1f15c3a3b16cc25cbf3ceb7f8e8b39515fe2907c7425c74c0bebb |
|
MD5 | 5e37055ac4f4ac0b1fdc6dd58657a4cc |
|
BLAKE2b-256 | eb4859b4a1f2e014b51054a7456a03f9bf475a699cd3ec7d90e6ea29a5dc4fe7 |