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.2.tar.gz (25.3 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.2-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slipstream_async-1.0.2.tar.gz
  • Upload date:
  • Size: 25.3 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.2.tar.gz
Algorithm Hash digest
SHA256 6a722cf68f3c0c7e6e914a677d3ff15909cad0e61e0b0b6d52a919456da61d0d
MD5 bccf783b8d738712dfe768c6aea7c38d
BLAKE2b-256 87686f6f78a4be4dab668efc8f18455b06094a1435bc50a5f827b686ecfdf11a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slipstream_async-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f7bc6d06236d2785cdea3f5260cd82bcceb0566d18a60f553cbcf728545b4ccb
MD5 3742e15e3369a0361e3e4061602bc7bd
BLAKE2b-256 dd91ac0044cea74cf399d92138fe003077539295c26c7555c224a17281c2981b

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