aiosafeconsumer is a library that provides abstractions and some implementations to consume data somewhere and process it.
Features:
Based on AsyncIO
Type annotated
Use logging with contextual information
Abstractions:
DataSource - waits for data and returns batch of records using Python generator
DataProcessor - accepts batch of records and precess it
DataTransformer - accepts batch of records and transform it and calls another processor to precess it. Extends DataProcessor
Worker - abstract worker. Do a long running task
ConsumerWorker - connects DataSource and DataProcessor. Extends Worker
DataWriter - base abstraction to perform data synchronization. Extends DataProcessor
Current implementations:
KafkaSource - read data from Kafka
RedisStreamSource - read data from Redis Streams
RedisWriter - synchronize data in Redis
ElasticsearchWriter - synchronize data in Elasticsearch
MongoDBWriter - synchronize data in MongoDB
PostgresWriter - synchronize data in PostgreSQL
WorkerPool - controller to setup and run workers in parallel. Can handle worker failures and restarts workers when it fails or exits.
Install:
pip install aiosafeconsumer
Install with Kafka:
pip install aiosafeconsumer[kafka]
Install with Redis:
pip install aiosafeconsumer[redis]
Install with Elasticsearch:
pip install aiosafeconsumer[elasticsearch]
Install with MongoDB:
pip install aiosafeconsumer[mongo]
Install with PostgreSQL:
pip install aiosafeconsumer[postgres]
Links:
Producer library: https://github.com/lostclus/django-kafka-streamer
Example application: https://github.com/lostclus/WeatherApp
TODO:
Enumerate IDs message type support in PostgreSQL writer
ClickHouse writer
Metadata
Release files for aiosafeconsumer 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiosafeconsumer-0.0.8.tar.gz | 39.2 kB | Without provenance | Details for aiosafeconsumer-0.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiosafeconsumer-0.0.8-py3-none-any.whl | Python 3 | none | any | Details for aiosafeconsumer-0.0.8-py3-none-any.whl |
Total release size: 65.5 kB
Release files / aiosafeconsumer-0.0.8.tar.gz
| Download URL | aiosafeconsumer-0.0.8.tar.gz |
|---|---|
| Size | 39.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
688c524e829f68d6b6d7ec5eb262ff5d2e856b4253e1adc630780902020ddcb8
|
|
BLAKE2b-256 checksum How to use checksums |
0074fee98166755f0ea0049decaa182cf4eb97c3311dc683c15250ddc35adf75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / aiosafeconsumer-0.0.8-py3-none-any.whl
| Download URL | aiosafeconsumer-0.0.8-py3-none-any.whl |
|---|---|
| Size | 26.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3d1377c00506348a2cc38f8eb1f744bd3b60ba43bb004d3136de06e8bc64b40
|
|
BLAKE2b-256 checksum How to use checksums |
03ca69fab7ba1cf5a6943e8dedb517cfd2f24a70d58ecf63c9f910f4daaff79f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for aiosafeconsumer 0.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.