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.6b0.tar.gz (18.5 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-0.0.6b0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file slipstream_async-0.0.6b0.tar.gz.

File metadata

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

File hashes

Hashes for slipstream_async-0.0.6b0.tar.gz
Algorithm Hash digest
SHA256 649cc24ed5251287a84411b2dfcfca4086896c59afb5b2b537a497381e285cc6
MD5 95e9b21def06a6780c533060823cf63e
BLAKE2b-256 7e79dc884996e0f439c28150914755ecc85ac05121372b49d56138b39cca5cda

See more details on using hashes here.

File details

Details for the file slipstream_async-0.0.6b0-py3-none-any.whl.

File metadata

File hashes

Hashes for slipstream_async-0.0.6b0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf2e31129e313b516e3327123ddb018bdd241a232751bfd5ad8daecce63e67cc
MD5 9bfb5eaaee3bfcac981dfc0883b56fd1
BLAKE2b-256 af96a7e8ca6e051c45884b5f5cfcac28041de6f913a0df37682721dd4ce9c8b2

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