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

Uploaded Source

Built Distribution

slipstream_async-0.0.2a0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slipstream_async-0.0.2a0.tar.gz
  • Upload date:
  • Size: 13.7 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.2a0.tar.gz
Algorithm Hash digest
SHA256 d58b54ffdf27692e4ee4776575ff0dff6e2726e7d2a86ce06e83e2f7fbc6c536
MD5 50f4b1d3b0c7202e4cfac1354115020b
BLAKE2b-256 c98f0907b1605de5b9e08623acca0bec28905f2bfd3ae8041bb7848028467627

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slipstream_async-0.0.2a0-py3-none-any.whl
Algorithm Hash digest
SHA256 8dcdd3e7d790e21fdbec402e36aa6d893bfd927ee2f4cd3076edbbc2d638d576
MD5 76ed8423e14262cd84f846d17df60cd2
BLAKE2b-256 6a1a230cb9e5f85b45bc217053ab958ae1f5374e847704ce66da2b3236d78389

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