Pre-release
This release is a pre-release and may not be stable for production use.
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
Slipstream components interoperate with basic python building blocks:
Any-thing can be passed around as data- Any
Callablemay be used as a sink AsyncIterablesact as sources- Parallelize through
handle
A many-to-many relation is established by passing multiple sources / sinks.
Quickstart
Install Slipstream along with aiokafka (latest):
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
Copy-paste this snippet.
Features
slipstream.handle: bind streams (iterables) and sinks (callables) to user defined handler functionsslipstream.stream: start streamingslipstream.Topic: consume from (iterable), and produce to (callable) kafka using aiokafkaslipstream.Cache: store data to disk using rocksdictslipstream.Conf: set global kafka configuration (can be overridden per topic). Produce is fail-fast by default; setproduce_retries/produce_retry_backoffto retry retriable broker errors (sources pause viaConf.signal_iterableswhile retrying)slipstream.codecs.JsonCodec: serialize and deserialize json messagesslipstream.Checkpoint: recover from stream downtimes
Metadata
Release files for slipstream-async 1.0.6b6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| slipstream_async-1.0.6b6.tar.gz | 41.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| slipstream_async-1.0.6b6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 69.2 kB
Release files / slipstream_async-1.0.6b6.tar.gz
| Download URL | slipstream_async-1.0.6b6.tar.gz |
|---|---|
| Size | 41.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
af1c6a48192f0efd41b9b67a0a86444305817558423c0eb4a60ec06843e86990
|
|
BLAKE2b-256 checksum How to use checksums |
cd4671e99d2208a90ee5a3f40e327c7b5f3c0bb50ac82f5bac701f8a638fcae0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.21
|
Release files / slipstream_async-1.0.6b6-py3-none-any.whl
| Download URL | slipstream_async-1.0.6b6-py3-none-any.whl |
|---|---|
| Size | 28.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2e099ab9d9387b1936ca71b281194bfccc1d896dd3913f3a5209c40d4bf33303
|
|
BLAKE2b-256 checksum How to use checksums |
1c1fb143b1ca6e35d822567f19b61214fd83eb7e7f2ef2f3b6d200fda7a10054
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.21
|