Skip to main content

Safe consume and process data.

Project description

https://github.com/lostclus/aiosafeconsumer/actions/workflows/tests.yml/badge.svg Current version on PyPi PyPI - Python Version

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

aiosafeconsumer-0.0.2.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

aiosafeconsumer-0.0.2-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

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

Hashes for aiosafeconsumer-0.0.2.tar.gz
Algorithm Hash digest
SHA256 deeb1cf4d8d495fcca96ea2d361abfeab0e09150954598063dbf8a9d8c322810
MD5 c69620a626b6336c5ede24e84d441ae1
BLAKE2b-256 e742b98c1873706dfbcd88e8aca50153a97aa48237f6b05a60d0c349bdea3b3c

See more details on using hashes here.

File details

Details for the file aiosafeconsumer-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for aiosafeconsumer-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 10fc85f7658570875f051a56085abbef9e8128c8e3d0cb7aad2c9fe42fe0ae56
MD5 4323283b78fe6450c4647cd49945c058
BLAKE2b-256 6ca7ba6da65860618487da37890ac2528ba9a6c31fb2b3e622f835bd0938722b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page