Type annotations for boto3.Kinesis 1.14.47 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-kinesis
Type annotations for boto3.Kinesis 1.14.47 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 Kinesis
service.
python -m pip install boto3-stubs[kinesis]
How to use
Client annotations
KinesisClient
provides annotations for boto3.client("kinesis")
.
import boto3
from mypy_boto3_kinesis import KinesisClient
from mypy_boto3_kinesis.paginator import (
DescribeStreamPaginator,
ListShardsPaginator,
ListStreamConsumersPaginator,
ListStreamsPaginator,
)
from mypy_boto3_kinesis.type_defs import ChildShardTypeDef, ...
from mypy_boto3_kinesis.waiter import StreamExistsWaiter, StreamNotExistsWaiter
client: KinesisClient = boto3.client("kinesis")
# 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: KinesisClient = session.client("kinesis")
Paginators annotations
mypy_boto3_kinesis.paginator
module contains type annotations for all paginators.
client: KinesisClient = boto3.client("kinesis")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
describe_stream_paginator: DescribeStreamPaginator = client.get_paginator("describe_stream")
list_shards_paginator: ListShardsPaginator = client.get_paginator("list_shards")
list_stream_consumers_paginator: ListStreamConsumersPaginator = client.get_paginator("list_stream_consumers")
list_streams_paginator: ListStreamsPaginator = client.get_paginator("list_streams")
Waiters annotations
mypy_boto3_kinesis.waiter
module contains type annotations for all waiters.
client: KinesisClient = boto3.client("kinesis")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
stream_exists_waiter: StreamExistsWaiter = client.get_waiter("stream_exists")
stream_not_exists_waiter: StreamNotExistsWaiter = client.get_waiter("stream_not_exists")
Typed dictionations
mypy_boto3_kinesis.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
def get_structure() -> ChildShardTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_kinesis
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("kinesis")
session_client = boto3.Session().client("kinesis")
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-kinesis-1.14.47.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a005e794a5d5fefc38f4e98baf60e1ecea860d004b4bf3cd4b1259f450bd9be5 |
|
MD5 | 3f6f0ab68c20347892ec1e3fb4bab27d |
|
BLAKE2b-256 | fef9e4e1eb30a2bb16552bbf665e7275675eb4cf7e7a9148c44601b0cb62e1a6 |
Hashes for mypy_boto3_kinesis-1.14.47.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de2c8a4727b3d6eb5d05a330e8cf2539095c75279626da6b022cec4f0081431f |
|
MD5 | e1c2798adecc488dbfcc2fdbebc87f76 |
|
BLAKE2b-256 | e29298cf5b7923e2453fd4a3e126b8eaeb3818b2ed92c1f4c27eed46b29bde5a |