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-async
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-async[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.1a0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: slipstream_async-0.0.1a0.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.1a0.tar.gz
Algorithm Hash digest
SHA256 7b562338379095b91b6e02c19274f4cf87dc0ff71113fc07d328f9c683c7e94f
MD5 f9992e5bded10bf81ba6fac665d02678
BLAKE2b-256 833e81ebf70065fb508a00950eb0978be10c4998c2432289a75f2414cbf716f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slipstream_async-0.0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 c30ad478a019b5cac990affcc2cc8a7083f7e7f772ddf28b9e1fdb518b718d17
MD5 603fe5eabe048e0048abcf901c7fa607
BLAKE2b-256 1783891e264f838cc045eea472f1e2960c0482588b03198227888649aa06e054

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