Skip to main content

Test Python Package Documentation Status Downloads

Snapstream

Snapstream provides a data-flow model to simplify development of stateful streaming applications.

Installation

pip install snapstream

Usage

We snap iterables to user functions, and process them in parallel when we call stream:

demo

We pass the callable print to print out the return value. Multiple iterables and sinks can be passed.

from snapstream import snap, stream

@snap(range(5), sink=[print])
def handler(msg):
    yield f'Hello {msg}'

stream()
Hello 0
Hello 1
Hello 2
Hello 3
Hello 4

To try it out for yourself, spin up a local kafka broker with docker-compose.yml, using localhost:29091 to connect:

docker compose up broker -d

Use the cli tool to inspect Topic/Cache:

snapstream topic emoji --offset -2
>>> timestamp: 2023-04-28T17:31:51.775000+00:00
>>> offset: 0
>>> key:
🏆

Features

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snapstream-1.0.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snapstream-1.0.0-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file snapstream-1.0.0.tar.gz.

File metadata

  • Download URL: snapstream-1.0.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.14 Linux/6.5.0-1016-azure

File hashes

Hashes for snapstream-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3d0ba0794a26ce33d402ea3470dc196ce4ced1ed72e3a18b6157b122b9d78dad
MD5 bf77f134867289779d1ff5b4da03437d
BLAKE2b-256 c967acd181918a0bc94ca852e29d2d09966e5424f5bbb2b183147cd413947ea0

See more details on using hashes here.

File details

Details for the file snapstream-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: snapstream-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.14 Linux/6.5.0-1016-azure

File hashes

Hashes for snapstream-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5323d0c7f5c94a459f7dfed460514b5e823784b65155f003b289b7c27603358
MD5 f0169ee279c281b6028d1dbb25d05fdb
BLAKE2b-256 740f9bd2576285f13a92facdf08a8f03a9b6b2ff4fcf0abd40d319a14f3ccc45

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

0.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page