Async AWS Kinesis client with consumer decorator, checkpointing, and factory pattern for EdgeStack IoT platform
Project description
esio-kinesis
Async AWS Kinesis client for the EdgeStack IoT platform. Provides publish, consume, and stream management with a factory pattern that supports sequential, concurrent, and Enhanced Fan-Out (EFO) consumer strategies.
Features
- Async-native — built on
aioboto3, safe inasynciotask groups - Consumer decorator pattern —
ack()/rollback(cause)for explicit at-least-once processing - Redis checkpointing — resumes from last processed sequence number on restart
- LocalStack compatible —
AT_TIMESTAMPfalls back toTRIM_HORIZONautomatically - Factory pattern — swap
KINESIS_CLIENT_TYPE=simple|concurrent|efovia env var, zero service code changes
Installation
pip install esio-kinesis
Quick start
from esio_kinesis import KinesisClientFactory
consumer = KinesisClientFactory.get(
client_type='simple',
endpoint_url='http://localhost:4566', # omit for real AWS
region='us-east-1',
checkpoint_store=redis_client, # optional Redis for checkpointing
consumer_id='my-service',
)
# Publish
await consumer.put_record('my-stream', '{"hello": "world"}', partition_key='key')
# Consume — ack/rollback are explicit
async for message in consumer.consume('my-stream'):
await process(message)
await consumer.ack()
Consumer types
KINESIS_CLIENT_TYPE |
Description | Status |
|---|---|---|
simple |
Sequential polling with Redis checkpointing | Available |
concurrent |
Semaphore-bounded concurrent batch processing | Planned |
efo |
Enhanced Fan-Out via SubscribeToShard |
Planned |
License
MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file esio_kinesis-1.2.0.tar.gz.
File metadata
- Download URL: esio_kinesis-1.2.0.tar.gz
- Upload date:
- Size: 90.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b79395e4df319f72ad0eee295ecd10d13044d3c512f820628bfb65c25e46d6f
|
|
| MD5 |
8f3009baf6333e952c0bd43238a4fa4a
|
|
| BLAKE2b-256 |
d483295f8aaa5104634a9eb22a4762f76b523916f11be144e6832df435316a6c
|
File details
Details for the file esio_kinesis-1.2.0-py3-none-any.whl.
File metadata
- Download URL: esio_kinesis-1.2.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09b1c9502bc9caeda0480f1ef83dc5c88781b95562758e08e626064c8f2838ed
|
|
| MD5 |
d17b2d35dd089e0f2c973ae6f20893bb
|
|
| BLAKE2b-256 |
f1839556d03b0c3caf66300002abfd4afb785889e3a91b0b241053cc0f9a78be
|