Install & Compatibility
Where this runs
tested against v1.43.78 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.621s · 53.4MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 5.7s · import 0.592s · 54MB
52MB installed
● package 52MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
KinesisClient
✓ from mypy_boto3_kinesis.client import KinesisClient
Import for the Kinesis client type annotation.
StreamExistsWaiter
✓ from mypy_boto3_kinesis.waiters import StreamExistsWaiter
Import for Kinesis StreamExistsWaiter type annotation.
ConsumerStatusType
✓ from mypy_boto3_kinesis.literals import ConsumerStatusType
Import for Kinesis literal types, useful for strict type checking of predefined string values.
ListStreamsOutputTypeDef
✓ from mypy_boto3_kinesis.type_defs import ListStreamsOutputTypeDef
Import for Kinesis TypedDict definitions, for type-hinting API response structures.
This quickstart demonstrates how to initialize a Boto3 Kinesis client with type annotations and list available Kinesis streams. Explicit type hints for the client and response structures provide static analysis benefits. Ensure AWS credentials and region are configured in your environment for the code to run successfully.
import boto3
from mypy_boto3_kinesis.client import KinesisClient
from mypy_boto3_kinesis.type_defs import ListStreamsOutputTypeDef
import os
def list_kinesis_streams() -> ListStreamsOutputTypeDef:
# Ensure boto3 is configured, e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY,
# and AWS_REGION environment variables or ~/.aws/credentials
# The 'client' variable is explicitly type-hinted for mypy/IDE benefit
client: KinesisClient = boto3.client("kinesis", region_name=os.environ.get('AWS_REGION', 'us-east-1'))
response: ListStreamsOutputTypeDef = client.list_streams()
print("Kinesis Streams:")
for stream_name in response.get("StreamNames", []):
print(f"- {stream_name}")
return response
if __name__ == "__main__":
# Example usage requires AWS credentials and region to be set up
# For demonstration, ensure environment variables are set or remove this check
if not os.environ.get('AWS_ACCESS_KEY_ID') or not os.environ.get('AWS_SECRET_ACCESS_KEY'):
print("Please set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables.")
print("Also, optionally set AWS_REGION (defaults to 'us-east-1').")
else:
try:
list_kinesis_streams()
except Exception as e:
print(f"An error occurred: {e}")
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0 (and consequently affects `mypy-boto3-kinesis`). Users on Python 3.8 should upgrade their Python version.fixUpgrade Python to 3.9 or higher.
affects: >=8.12.0 (builder), >=1.42.41 (package)
breakingIn `mypy-boto3-builder` version 8.9.0, some `TypeDef` names were shortened (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). While this example is for CloudFront, similar changes might affect Kinesis-specific `TypeDefs` if they followed the same pattern.fixReview your code for any custom `TypeDef` imports from `mypy_boto3_kinesis.type_defs` and update names if they reflect the shortened pattern.
affects: >=8.9.0 (builder)
gotchaThis package provides *type annotations* for Boto3; it does not replace the actual `boto3` library, which must be installed separately and is required at runtime for your application to function.fixAlways ensure `boto3` is installed alongside `mypy-boto3-kinesis` or `boto3-stubs[kinesis]`.
affects: All
gotchaWhen using `boto3.client()` or `boto3.session.client()` without installing `boto3-stubs` (i.e., only `mypy-boto3-kinesis`), explicit type annotations are often necessary for optimal IDE auto-completion and static analysis. For example: `client: KinesisClient = boto3.client("kinesis")`.fixFor best type inference without explicit annotations, install the full `boto3-stubs` package with the Kinesis extra: `pip install 'boto3-stubs[kinesis]'`.
affects: All
gotchaFor Pylint compatibility and to avoid `undefined-variable` warnings when using `TYPE_CHECKING` for conditional imports, you might need to assign `object` to your client types in the non-`TYPE_CHECKING` block.fixUse `if TYPE_CHECKING: from mypy_boto3_kinesis.client import KinesisClient else: KinesisClient = object` in your code.
affects: All
Upgrade
Version history
1.43.78latest on PyPI · released Aug 21, 2026
Audit
Dependencies
boto3requiredProvides the AWS SDK for Python, which this library annotates. This library only provides types, not runtime functionality.
boto3-stubsoptionalThe umbrella package for Boto3 type annotations, often installed with service-specific extras like `boto3-stubs[kinesis]`. This is the recommended installation method.