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-1.0.0.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

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

slipstream_async-1.0.0-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slipstream_async-1.0.0.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for slipstream_async-1.0.0.tar.gz
Algorithm Hash digest
SHA256 67f66a665180cb67488e8fbb2a164d3ab3bb4f3cca11b26a21940bd177fd0c3f
MD5 fe7877693f99e33fae4c54c2ac4c5dfe
BLAKE2b-256 17815c2c6733926813e4e92c7aadbdaf1918e0106e105f69d1b22993e91b0e8c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slipstream_async-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1fa4d346a11f8585fdbfc88f42c8de8e20986852f5d7756c526ef493b318aa40
MD5 1ac0adfafc2cb71799273b8f1b7a2bbb
BLAKE2b-256 6c19f94546c426508ee94b1243b8f8b9d63de615758fe4af5f850c77cdb8b4d2

See more details on using hashes here.

Supported by

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