https://github.com/yuvadm/rivulet
Elengant asynchronous data streams
https://github.com/yuvadm/rivulet
async asyncio data-processing data-stream python
Last synced: 11 months ago
JSON representation
Elengant asynchronous data streams
- Host: GitHub
- URL: https://github.com/yuvadm/rivulet
- Owner: yuvadm
- Created: 2025-03-20T12:22:33.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-03-20T12:38:09.000Z (11 months ago)
- Last Synced: 2025-03-20T13:55:56.970Z (11 months ago)
- Topics: async, asyncio, data-processing, data-stream, python
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rivulet
Elegant asynchronous data streams
```python
from rivulet import BatchProcessor
async def item_stream():
for i in range(10):
yield i
await asyncio.sleep(0.1)
async def main():
processor = BatchProcessor(batch_size=3, timeout_seconds=0.5)
async for batch in processor.process(item_stream()):
print(f"Processing batch of {len(batch)} items: {batch}")
```