Type annotations for boto3.Kinesis 1.14.14 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-kinesis
Type annotations for boto3.Kinesis 1.14.14 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 ConsumerDescriptionTypeDef, ...
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() -> ConsumerDescriptionTypeDef:
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.14.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99328ba05ed779f0d443d707efb07b98b630a9e3a43035366e4ed9c6119c89cc |
|
MD5 | bfc453fac804c99b92ed4a5726169b49 |
|
BLAKE2b-256 | 6acb18616483f814fa7b4830fa1c7fd9a8ebcda25e95944ec8c71b2dec559954 |
Hashes for mypy_boto3_kinesis-1.14.14.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c17837828aaf5dbd0c731eb0d92b9b5a2306907b081ee65b6c0476653eebdfb1 |
|
MD5 | 8fc71839bc7ebef5b7c69f3e34e03d30 |
|
BLAKE2b-256 | 3f8fef16324e64da2cfebc159fc37f185168fe8e42b1520f664e75bbf51a1313 |