Ergonomic Concurrency

Posted by kwargs_@reddit | Python | View on Reddit | 15 comments

Project name: Pipevine
Project link: https://github.com/arrno/pipevine

What My Project Does
Pipevine is a lightweight async pipeline and worker-pool library for Python.
It helps you compose concurrent dataflows with backpressure, retries, and cancellation.. without all the asyncio boilerplate.

Target Audience
Developers who work with data pipelines, streaming, or CPU/IO-bound workloads in Python.
It’s designed to be production-ready but lightweight enough for side projects and experimentation.

How to Get Started

pip install pipevine

import asyncio
from pipevine import Pipeline, work_pool

@work_pool(buffer=10, retries=3, num_workers=4)
async def process_data(item, state):
    # Your processing logic here
    return item * 2

@work_pool(buffer=5, retries=1)
async def validate_data(item, state):
    if item < 0:
        raise ValueError("Negative values not allowed")
    return item

# Create and run pipeline
pipe = Pipeline(range(100)) >> process_data >> validate_data
result = await pipe.run()

Feedback Requested
I’d love thoughts on: