Type annotations for boto3.Kinesis 1.14.12 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-kinesis
Type annotations for boto3.Kinesis 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 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.12.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a1b99a170a8cc10b07a362d51fd24bf0961a831ed8245428b61eeb2cb2a5e98 |
|
MD5 | 1487f8eade0762d013cec3c27e4ab7d3 |
|
BLAKE2b-256 | d84edc6fe77ce8ed233ffcb7f4afa18525ad4f8790ad96acc5a996fabd237b60 |
Hashes for mypy_boto3_kinesis-1.14.12.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7d00e44abbc2c46d1018d3a94fa37ab092c0f1a626d4a66c18ac332001aea66 |
|
MD5 | 0ecedf3f2008adcc4cd8144a3e93c400 |
|
BLAKE2b-256 | 234fce24156a342a6493494284b5bc00b2bb8beb60c3996ca282d5c3b6718428 |