Safely 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.3.tar.gz
.
File metadata
- Download URL: aiosafeconsumer-0.0.3.tar.gz
- Upload date:
- Size: 27.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 | 7599790a0efb69b6648d30abd0728a1fb5817fcfe98fdfbe410f797ba4160880 |
|
MD5 | 51cc7e552fbb353e8b621d97dcda413f |
|
BLAKE2b-256 | 56ad2d45bf1a3207a9095cea32e0eaf56a558975f8b39f7261b0febd73b46633 |
File details
Details for the file aiosafeconsumer-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: aiosafeconsumer-0.0.3-py3-none-any.whl
- Upload date:
- Size: 17.8 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 | dd515b1fa73b9d5c63a114b3eb5ca958b84f230ee6e1ff8b3a402a85b457ed63 |
|
MD5 | 3c9a7efc7d83b0e6ed3ac5ffc0d5f599 |
|
BLAKE2b-256 | 085de8e18e063473b412439c39630f18f6e8d76b94dcea877104b422ff8082c0 |