Safe consume and process data.
Project description
aiosafeconsumer is a library that provides abstractions and some implementations to consume data somewhere and process it.
Features:
Based on AsyncIO
Type annotated
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
ConsumerWorker - connects DataSource and DataProcessor
DataWriter - base abstraction to perform data synchronization
Current implementations:
KafkaSource - read data from Kafka
RedisWriter - synchronize data in Redis
WorkerPool - controller to setup and run workers in parallel. Can handle worker failures and restarts workers when it fails or exits.
Recommend producer library: https://github.com/lostclus/django-kafka-streamer
Example application: https://github.com/lostclus/WeatherApp
Project details
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
File details
Details for the file aiosafeconsumer-0.0.2.tar.gz
.
File metadata
- Download URL: aiosafeconsumer-0.0.2.tar.gz
- Upload date:
- Size: 23.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | deeb1cf4d8d495fcca96ea2d361abfeab0e09150954598063dbf8a9d8c322810 |
|
MD5 | c69620a626b6336c5ede24e84d441ae1 |
|
BLAKE2b-256 | e742b98c1873706dfbcd88e8aca50153a97aa48237f6b05a60d0c349bdea3b3c |
File details
Details for the file aiosafeconsumer-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: aiosafeconsumer-0.0.2-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10fc85f7658570875f051a56085abbef9e8128c8e3d0cb7aad2c9fe42fe0ae56 |
|
MD5 | 4323283b78fe6450c4647cd49945c058 |
|
BLAKE2b-256 | 6ca7ba6da65860618487da37890ac2528ba9a6c31fb2b3e622f835bd0938722b |