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.1.tar.gz (24.8 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.1-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slipstream_async-1.0.1.tar.gz
  • Upload date:
  • Size: 24.8 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.1.tar.gz
Algorithm Hash digest
SHA256 5a419e8f49222e345567c5faab65b05e64c027bf34d805cdd2341779f144b4d5
MD5 44c7fa2f03b6abb476e361bbad0a3e67
BLAKE2b-256 5f5c91034c0e4923c22134830c5b8c4465708139796b570a72dbd85580a26634

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for slipstream_async-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 32e299a6d431141a16f10490050fe6bfd2e0f9fce8f0cea6bb2e698af14a8f49
MD5 7bf7fe39b0736920cfa886ecf0cdfbb1
BLAKE2b-256 d3d30030dd1475696a9c8a8dfed8522fa8e478cd0f078f4cff807c85d8805f3a

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