Skip to main content

Streamline your Kafka data processing, this tool aims to standardize streaming data from multiple Kafka clusters. With a pub-sub approach, multiple functions can easily subscribe to incoming messages, serialization can be specified per topic, and data is automatically processed by data sink functions.

Project description

Snapstream

An easy to use, extensible data-flow model, providing sensible defaults to produce and consume to and from kafka, serialize/deserialize messages, and cache large amounts of data.

Installation

pip install snapstream

Usage

In the example below, snap decorates the handle function, binding the iterable range(5) to it:

from snapstream import snap, stream


@snap(range(5))
def handle(msg):
    print('Greetings', msg)

stream()
 python main.py
Greetings 0
Greetings 1
Greetings 2
Greetings 3
Greetings 4

Features

  • snapstream.Topic: consume from topic (iterable), produce to topic (callable), uses confluent-kafka by default
  • snapstream.Cache: persist data, uses rocksdict
  • snapstream.Conf: configuration singleton class, manages threads for all streams
  • snapstream.stream: start streams
  • snapstream.snap: bind streams (iterable) and sinks (callable) to handler functions

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

snapstream-0.0.0.dev2.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

snapstream-0.0.0.dev2-py3-none-any.whl (8.1 kB view hashes)

Uploaded Python 3

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