Skip to main content

RapidPipe: Advanced Data Orchestration Framework

RapidPipe is a high-performance, asynchronous-capable, and history-aware pipeline execution framework for Python. It provides an elegant, expressive syntax for defining directed acyclic graphs (DAGs) of computational layers, complete with built-in temporal windowing, dynamic task-graph scheduling, and live visualization.

Built from the ground up to support both synchronous (CPU-bound) and asynchronous (I/O-bound) operations natively, RapidPipe eliminates the boilerplate of thread pools and event loops, letting you focus entirely on your transformation logic.


🌟 Key Features

  • Intuitive Dependency Resolution: Declare inputs via powerful string semantics (e.g., "signal.value[-3:]" or "camera.frame") and let the framework automatically calculate topology and data-retention requirements.
  • Fine-Grained Task Scheduling: Pipeline cycles run using an optimized asyncio task-graph. Layers launch the exact microsecond their dependencies resolve, eliminating synchronous layer-barrier penalties.
  • Smart Execution Modes (AUTO): The pipeline performs static analysis on your DAG to automatically assign the most efficient threading or inlining constraints. Isolated layers execute inline to avoid overhead, while functionally independent branches inherently parallelize.
  • Built-in Temporal History: Read from past cycles trivially. The pipeline automatically maintains rolling deques for each output, sized strictly to what downstream layers need.
  • Interactive D3.js Visualization: Instantly generate physics-based, interactive HTML maps of your architecture, tracking specific execution modes, topological layout, and (optionally) live latency metrics.
  • Nested Pipelines: Use a full Pipeline as a standard Layer inside another pipeline, easily building highly composable and reusable sub-architectures.
  • Hot-swapping & Modifiability: Dynamically add, remove, or hot-swap layers at runtime using .replace_layer() with zero downtime, preserving relevant historical states.

🏗️ Core Concepts

1. Layers (Layer)

A layer is the fundamental unit of computation. Every layer must define its expected inputs and outputs during __init__, and implement a process() (and/or async def aprocess()) method.

from rapidpipe import Pipeline, Layer

class SensorLayer(Layer):
    def __init__(self):
        super().__init__(name="sensor", outputs=["temperature"])

    def process(self):
        return 22.5  # Returns to "temperature"

class LoggerLayer(Layer):
    def __init__(self):
        super().__init__(name="logger", inputs={"temp": "sensor.temperature"})

    def process(self, temp):
        print(f"Logged temperature: {temp}")

2. Execution Modes

Layers can specify an execution_mode:

  • AUTO (Default): Dynamically optimizes. If the layer has an aprocess(), it executes as an async task. If symmetric concurrent branches exist, it executes in a THREAD. If it sequentially blocks all execution (no peers), it safely executes INLINE.
  • ASYNC: Enforces execution on the asyncio event loop (requires aprocess()). Ideal for I/O waits, sockets, and API calls.
  • THREAD: Enforces execution onto a concurrent ThreadPool. Ideal for CPU-bound computations that release the GIL (e.g., Pandas/Numpy operations).
  • INLINE: Forces blocking, synchronous execution directly on the main orchestration thread. Best for trivial logic where threading overhead costs more than the process itself.

3. Smart History Variables

Access historical execution output immediately simply by slicing dependencies:

  • Current value: "layer.variable" (Creates a strict cyclic dependency).
  • Previous value: "layer.variable[-1]" (Refers to 1 cycle ago).
  • Index range (Windowing): "layer.variable[-3:]" (List array of the last 3 values).
  • Time range: "layer.variable[-2.5s:]" (Values from the last 2.5 seconds).

Note: Sliced dependencies ([-1], [-3:]) are considered chronological requirements, meaning they do not block execution synchronously in the current DAG topological cycle.


🚀 Advanced Capabilities

Interactive Diagnostics

Diagnose bottlenecks and verify DAG structures visually:

pipe.show_graph(name="My Pipeline", free=True)

Creates a dynamic local HTML/D3.js instance coloring .layer topologies by dependencies!

State Serialization

Stop a pipeline, save its history bounds to disk, and revive it effortlessly:

pipe.save_state("monday_run.pkl")
# ... later, or in a fresh node:
pipe.load_state("monday_run.pkl")

Numba Integration

Included numba_layer.py seamlessly allows ultra-fast JIT-compiled matrix mathematics natively pipelined without escaping the Python DAG.

Performance Metrics & Profiling

Pass a MetricsCollector to the Pipeline, run benchmarks, and examine .summary() to inspect median latencies, jitter, and P99 latency times inside of layers.


📂 Project Structure

rapidpipe/
├── src/rapidpipe/         # Core Framework (Layer, Pipeline, Metrics)
│   └── utils/             # Visualization tools (D3.js generation)
├── examples/              # Educational blueprints & implementation demos
│   ├── 01_basic_pipeline.py
│   ├── 02_dag_parallelism.py
│   ├── 03_history_and_windowing.py
│   └── ...
└── tests/                 # Pytest validation suites ensuring deterministic
    └── ...                  pipeline features and error boundaries.

🛠 Usage & Quickstart

  1. Prerequisites: Python 3.10+ highly recommended.
  2. Installation: Since this relies closely on native asyncio and nx graphing patterns (with visualization HTMLs), ensure your virtual environment installs the base standard tooling via pyproject.toml.
  3. Examples: Navigate to examples/ and run any script to see it in action!
    python examples/01_basic_pipeline.py
    # or
    uv run examples/01_basic_pipeline.py
    
  4. Testing: Run the internal suite using standard pytest:
    pytest tests/
    

Metadata

Release files for rapidpipe 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rapidpipe 1.0.4
File Size Uploaded Provenance Actions
rapidpipe-1.0.4.tar.gz 35.9 kB With provenance Details for rapidpipe-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rapidpipe 1.0.4
File Interpreter ABI Platform Actions
rapidpipe-1.0.4-py3-none-any.whl Python 3 none any Details for rapidpipe-1.0.4-py3-none-any.whl

Total release size: 76.5 kB

Release files / rapidpipe-1.0.4.tar.gz

Download URL rapidpipe-1.0.4.tar.gz
Size 35.9 kB
Tags Source
SHA-256 checksum
How to use checksums
68a20aa342d85578a8fa07e2b3fc71a817961cab55b9904c149c8ed17fa658e1
BLAKE2b-256 checksum
How to use checksums
d49f88b71f2dcdbd43658e1ac53e75199be214549dc794d39a5c524c85ad55c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 16, 2026.

Transparency log

Release files / rapidpipe-1.0.4-py3-none-any.whl

Download URL rapidpipe-1.0.4-py3-none-any.whl
Size 40.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a353c4194fe148bcacc4f6dab5663f2adea26bf85b3c004f6451ff6fdbc080a0
BLAKE2b-256 checksum
How to use checksums
57c0727a4a51bbf323ab4db3742b7e78b0d1b720dc14ad82afd92971cb5fe24d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 16, 2026.

Transparency log

Security for rapidpipe 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rapidpipe-1.0.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page