PyCAPIO¶
PyCAPIO brings transparent data streaming to file-based Python workflows, minimizing I/O bottlenecks without requiring code modifications. It works by monkey patching Python’s built-in I/O methods and classes, interfacing them natively with the CAPIO methodology.
When a workflow step runs under PyCAPIO, any access to a path inside the configured CAPIO directory is routed through the CAPIO server instead of the operating system, while all other I/O behaves exactly as it normally would.
Where to start¶
Installation — prerequisites and how to install PyCAPIO.
Usage — the three ways to enable interception (CLI,
CapioContext, and the low-level internals).pycapio — high-level API — the high-level Python API.
Native API and C++ API reference — the native (C++/pybind11) layer.
At a glance¶
from pycapio import CapioContext
@CapioContext(capio_dir=".", app_name="reader", workflow_name="example_workflow")
def read(path):
with open(path, "r") as f:
return f.read()
# Only the I/O performed inside this call is intercepted by CAPIO.
data = read("example.txt")