Skip to main content

Streamline your stream processing.

Project description

Test Python Package Documentation Status Downloads

Slipstream

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

pip install slipstream
from asyncio import run

from slipstream import handle, stream


async def messages():
    for emoji in '🏆📞🐟👌':
        yield emoji


@handle(messages(), sink=[print])
def handle_message(msg):
    yield f'Hello {msg}!'


if __name__ == '__main__':
    run(stream())
Hello 🏆!
Hello 📞!
Hello 🐟!
Hello 👌!

Usage

Async iterables are sources, (async) callables are sinks.

Decorate handler functions using handle, then run stream to start processing:

demo

Multiple sources and sinks can be provided to establish many-to-many relations between them. The 4 emoji's were printed using the callable print.

Quickstart

Install aiokafka (latest) along with slipstream:

pip install slipstream[kafka]

Spin up a local Kafka broker with docker-compose.yml, using localhost:29091 to connect:

docker compose up broker -d

Follow the docs and set up a Kafka connection: slipstream.readthedocs.io.

Features

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

slipstream_async-0.0.0a0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

slipstream_async-0.0.0a0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file slipstream_async-0.0.0a0.tar.gz.

File metadata

  • Download URL: slipstream_async-0.0.0a0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.15

File hashes

Hashes for slipstream_async-0.0.0a0.tar.gz
Algorithm Hash digest
SHA256 e994a2d340cc4bd9f2570af9619e99436d710ba573e24357730a777c668ad660
MD5 679b117efcdb50b6c1f090a5e5690b22
BLAKE2b-256 283420ee2cf4b6195b23e45fd162ff2e7c587841aa74432ca3389a53cc2dcd72

See more details on using hashes here.

File details

Details for the file slipstream_async-0.0.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for slipstream_async-0.0.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 97ccadede640fa7163f131f924bcb8cb6526e8f82007b85e532584d7969da732
MD5 5ca625d0628c10c52cfbef18927e924c
BLAKE2b-256 a55b505ac86ac78f257c015791a223443c04be6a1b688e86415e037cb888ad2f

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