Type annotations for boto3.Kinesis 1.14.34 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-kinesis
Type annotations for boto3.Kinesis 1.14.34 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.34.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12029496a7784c9d54f44ce403adb4c64fc4e7f111e96334372edbd46c957a4e |
|
MD5 | a3f8808a74b1b0f8bb9e26dc116ef52c |
|
BLAKE2b-256 | 027b65f9f237561164b4168e738a9b2cfdfc278c7b87debc8d4122ea26d10f36 |
Hashes for mypy_boto3_kinesis-1.14.34.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be93372319bd4a9a75b2e25a869b8024d5e43e1c08c89d4aa00b2262527dfa45 |
|
MD5 | 08680f6e80a92cf7721b145530aabe73 |
|
BLAKE2b-256 | a4f9d66ac71070f0acf76cf3d9f7057d7d61df47c2c3520f1a681da65231862f |