Registry /
type-stubs / types-aiobotocore-kinesis
Install & Compatibility
Where this runs
tested against v3.7.0 · 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.920 runs
installs and imports cleanly · install 0.0s · import 1.089s · 59.7MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 6.1s · import 0.997s · 62MB
60MB installed
● package 60MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
KinesisClient
✓ from types_aiobotocore_kinesis.client import KinesisClient
✗ from aiobotocore.kinesis.client import KinesisClient
Type stubs are imported from their dedicated `types-` package, not directly from the runtime library.
PutRecordRequestRequestTypeDef
✓ from types_aiobotocore_kinesis.type_defs import PutRecordRequestRequestTypeDef
✗ from aiobotocore.kinesis.type_defs import PutRecordRequestRequestTypeDef
TypedDicts and other type definitions are also imported from the `types-` package.
This quickstart demonstrates how to use `types-aiobotocore-kinesis` with `aiobotocore` to put a record into an Amazon Kinesis stream. It shows how to explicitly type the Kinesis client and the request parameters using `TypedDicts` for improved type checking and IDE auto-completion. This example requires `aiobotocore` and valid AWS credentials configured for the specified region.
import asyncio
from aiobotocore.session import get_session
from types_aiobotocore_kinesis.client import KinesisClient
from types_aiobotocore_kinesis.type_defs import PutRecordRequestRequestTypeDef
import os
async def put_kinesis_record(stream_name: str, data: str, partition_key: str):
session = get_session()
async with session.create_client("kinesis", region_name=os.environ.get('AWS_REGION', 'us-east-1')) as client: # type: KinesisClient
request_params: PutRecordRequestRequestTypeDef = {
"StreamName": stream_name,
"Data": data.encode('utf-8'),
"PartitionKey": partition_key,
}
response = await client.put_record(**request_params)
print(f"Shard ID: {response['ShardId']}, Sequence Number: {response['SequenceNumber']}")
async def main():
# Example usage: Replace with your stream name, data, and partition key
# Ensure AWS_REGION environment variable is set or passed to create_client
# Also ensure AWS credentials are configured.
await put_kinesis_record("my-test-stream", "Hello Kinesis!", "my-partition-key")
if __name__ == "__main__":
# For demonstration, setting dummy env var if not present
if 'AWS_REGION' not in os.environ:
os.environ['AWS_REGION'] = 'us-east-1'
asyncio.run(main())
Debug
Known issues
breakingSupport for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0, which generates these type stubs. Packages generated with this builder version and later will only support Python 3.9 and higher.fixUpgrade your Python environment to 3.9 or newer. If stuck on Python 3.8, use an older version of `types-aiobotocore-kinesis` (e.g., <3.4.0) that was generated with `mypy-boto3-builder` <8.12.0.
affects: >=3.4.0 (for types-aiobotocore-kinesis), >=8.12.0 (for mypy-boto3-builder)
breakingThe `mypy-boto3-builder` migrated to PEP 561 package format in version 8.12.0. While largely internal, this change might affect how some tools discover or interact with the stub packages.fixEnsure your type checker and IDE are updated to recent versions that fully support PEP 561 packages. No direct code change is typically required for end-users.
affects: >=3.4.0 (for types-aiobotocore-kinesis), >=8.12.0 (for mypy-boto3-builder)
gotchaThis package provides *only* type annotations. The actual `aiobotocore` library must be installed separately for your code to run at runtime. Failure to install `aiobotocore` will result in a `ModuleNotFoundError`.fixAlways install both the type stubs and the runtime library: `pip install types-aiobotocore-kinesis aiobotocore`.
affects: All versions
gotchaUsers of PyCharm may experience slow performance or high CPU usage due to how PyCharm's type checker handles `Literal` overloads in these generated stubs. It is recommended to use `mypy` or `pyright` for type checking, or to consider `types-aiobotocore-lite` packages as a workaround if PyCharm's internal type checker is preferred.fixDisable PyCharm's internal type checker and use an external tool like `mypy` or `pyright`. Alternatively, install `types-aiobotocore-lite` for the specific service (if available) which offers a lighter set of annotations.
affects: All versions
Upgrade
Version history
3.7.0latest on PyPI · released May 10, 2026
Audit
Dependencies
aiobotocorerequiredThis package provides type stubs for the 'aiobotocore' library; the runtime library must be installed for code execution.
mypyoptionalCommonly used type checker to leverage these type annotations, though pyright or other type checkers also work.