Type annotations for boto3.Kinesis 1.14.41 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-kinesis
Type annotations for boto3.Kinesis 1.14.41 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.41.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5fbf777d378657dfb9f9b500d94b63baad2e39336d7466c6e6f19d9a441b148 |
|
MD5 | 753366af05d862e7bb2fbff5329a5d71 |
|
BLAKE2b-256 | 9d803612d70e5eeee19f0e57f92d095a48107ea627c8719769c3a922eba6e7ae |
Hashes for mypy_boto3_kinesis-1.14.41.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebe023b7eb19e9c3c6b568a4559426b88996019665826026bf024f7355211381 |
|
MD5 | 926e5828166206b0ea00aecea01b9df2 |
|
BLAKE2b-256 | b78056b0c6e86ab6bdf4f2cdb935e142a85859fb3ac7b17847ea131bfd952d39 |