Skip to main content

Streamline your stream processing.

Project description

Test Python Package Documentation Status PyPI 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:

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.4a0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

slipstream_async-0.0.4a0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slipstream_async-0.0.4a0.tar.gz
  • Upload date:
  • Size: 14.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.4a0.tar.gz
Algorithm Hash digest
SHA256 36c79f557150f63f750ef18e419e4b82aa7e4f85b7d49f4d19ad1f861270d30d
MD5 9d4a7f1006d5cd15a439e28c9431b317
BLAKE2b-256 8299acb5f3a550aebfda9274ad13554b50149d2704a6c8c614f371a6d1862cac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slipstream_async-0.0.4a0-py3-none-any.whl
Algorithm Hash digest
SHA256 79b54d38b60304b51a297169b765af8db91bded1e6d645ae923b9c849f5df8cd
MD5 b7d5b416b495664adac46501727c3b00
BLAKE2b-256 145f1adb3e915ea7ac0e1c31a9c87bb6f0f146b8ba4537dfebd645ae5b1c6968

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