Skip to main content

Python interface library for the libcapio library

Project description

PyCAPIO

codecov CI Tests

PyPI version Python Versions

PyCAPIO brings transparent data streaming to file-based Python workflows, minimizing I/O bottlenecks without requiring code modifications. PyCAPIO works by monkey patching built-in IO methods and classes, interfacing them natively with the CAPIO methodology.


Prerequisites

Before installing PyCAPIO, ensure your system meets the following requirements:

Dependency Minimum Version / Notes
Python $\ge$ 3.10 (including development libraries/headers)
MPI A working MPI implementation (e.g., OpenMPI, MPICH)
Build Tools CMake & GCC compilers

At Compile time, CAPIO is also fetched and compiled from source.


Installation

From PyPI (Recommended)

PyCAPIO is available as prebuilt wheels on PyPI. You can install it inside a virtual environment:

python3 -m venv venv
source venv/bin/activate
pip install pycapio

From Source

To build and install PyCAPIO from the source repository:

git clone [https://github.com/High-Performance-IO/PyCAPIO.git](https://github.com/High-Performance-IO/PyCAPIO.git)
cd PyCAPIO
python3 -m venv venv
source venv/bin/activate
pip install .

Usage

  1. Global Interception (CLI) PyCAPIO can be invoked via the command line to inject streaming capabilities across your entire workflow step:
    pycapio --capio-dir ./dir --app-name app --workflow-name ./workflow my_step.py
    
  2. Fine-Grained Interception (CapioContext) For precise control over which regions handle interception, use the CapioContext decorator. Only I/O operations executed inside this context will be intercepted by CAPIO.
    from pycapio import CapioContext
    
    
    @CapioContext(capio_dir=".", app_name="reader", workflow_name="example_workflow")
    def read(path):
        with open(path, "r") as f:
            data = f.read()
            return data
    
    # Only I/O within this function call is intercepted
    data = read("example.txt")
    
  3. PyCAPIO internal It is finally possible to use PyCAPIO's internal methods to intercept I/O operations. To do this, simply import the PyCAPIO internal module and use its methods.
    from pycapio.internals import *
    
    This will import all the necessary methods and classes that can be used to develop custom IO modules which will interface directly with the CAPIO server.

Important Notes

[!IMPORTANT] PyCAPIO natively intercepts I/O operations that use Python's built-in methods. If your script relies on external libraries compiled into shared objects (.so files), please bypass Python-level interception and use the standard LD_PRELOAD approach for CAPIO instead.

Team

Developing team

Name Role Contact
Marco Edoardo Santimaria Designer and Maintainer email | Homepage
Rosa Filgueira Workflows Expert email | Homepage
Iacopo Colonnelli Workflows Expert email | Homepage
Marco Aldinucci Supervisor email | Homepage

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycapio-0.0.1.tar.gz (22.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pycapio-0.0.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pycapio-0.0.1-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (6.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

pycapio-0.0.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pycapio-0.0.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (6.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

pycapio-0.0.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pycapio-0.0.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (6.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

pycapio-0.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pycapio-0.0.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (6.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

pycapio-0.0.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pycapio-0.0.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl (6.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.26+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file pycapio-0.0.1.tar.gz.

File metadata

  • Download URL: pycapio-0.0.1.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for pycapio-0.0.1.tar.gz
Algorithm Hash digest
SHA256 db077f07f93bdab015a5d68598d7bdab0f9ba839d43ab8661fcd840145a75c4e
MD5 eed836ef0cd751a66d5ee9ff73a25fef
BLAKE2b-256 e4720a17408e185b1db33dd465d31c1a7bea33cb8f76adf580e28954ff93da6e

See more details on using hashes here.

File details

Details for the file pycapio-0.0.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pycapio-0.0.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f6bf9cb26265f965699e4946c1bd95bad2cf8233333facebc83031d72b0c9e0f
MD5 20ba72e5c96676b65e096eed775a8a11
BLAKE2b-256 7c8bdf04b610a11a86fbbfd4834d7528b5fc22cc37ee2f314a2f981eade7e3d6

See more details on using hashes here.

File details

Details for the file pycapio-0.0.1-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pycapio-0.0.1-cp314-cp314-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 17d5b0762e9952d6ade43e3e8c49b6e99de9a164d2ae30ba503faa9abc5cb630
MD5 d8b41e03bc8c9f958c3e1bda8c454ce7
BLAKE2b-256 6658d45711d5a7ff2f65d20b5ffa7b346c4dedf9692ec42dcef952ad7780e86b

See more details on using hashes here.

File details

Details for the file pycapio-0.0.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pycapio-0.0.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 80672fe52178f87904336e69305f68813f59dbcd9b4e481f9268470ec43f329d
MD5 6a6e826cc32b72f62ad341729de2f999
BLAKE2b-256 1cd7b5fc5eef29fbb15f1103da69af4e18d48e59f8b2d27242da3cc0d1db78b1

See more details on using hashes here.

File details

Details for the file pycapio-0.0.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pycapio-0.0.1-cp313-cp313-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ce1c389d79024347fd04f6a91e8482fd84f430098ec7dcf1450944e709bc75bd
MD5 dd67a354d7cf5313243bc0aa1e948d52
BLAKE2b-256 98aa4803fad1b2fdcd557ec4534a2e5076fe156d013e450ee94b262e8d501d6b

See more details on using hashes here.

File details

Details for the file pycapio-0.0.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pycapio-0.0.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2f1bbab7c08cabde3195d4edf7eb3fb0a90833a1062c1e0f47e08a61d31094ad
MD5 162dd647fc047897bf6a015d0e1b0b01
BLAKE2b-256 e577efdbe0ce734b59b5655ed810adbcef0acc33744b5e0c430bfe9e8105ad1f

See more details on using hashes here.

File details

Details for the file pycapio-0.0.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pycapio-0.0.1-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f93ea694f2442dd01021bc74aa66313f7dfff4ccf1872f8dcc186acc8f7a7a41
MD5 30829ad36257e170dd1eac907ea250ab
BLAKE2b-256 c44553a2fc515cad590d5eb1d6c3d4fe6752d3bfa895632f7f02595473bf4210

See more details on using hashes here.

File details

Details for the file pycapio-0.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pycapio-0.0.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7a27d70df11e06581a5fd6368e771904ec483d75930d4af64a6ffb503b02a6e6
MD5 2e4273496828b90692c99411d1d300a1
BLAKE2b-256 06b5ab4cc3528cb607a57b5e94e81a507d77c9f7e7dcafe504b1f93e9c8a1e4b

See more details on using hashes here.

File details

Details for the file pycapio-0.0.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pycapio-0.0.1-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 53a0141116786f63cf161f82bd67d3a4ec46bab5037d22893379ba3dcc43c426
MD5 8e1074ce153600d68ec5194d80193919
BLAKE2b-256 d2c1b89d3659b498e36fbe75ca2b2be5f35f0a2aa4b478550e4b28242de0c646

See more details on using hashes here.

File details

Details for the file pycapio-0.0.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pycapio-0.0.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 80e19643afb660f2cabf9308c091874e812014183825f9b600268058b8ffc127
MD5 4c74dd67f9ef0c6a6ebb3266fd30f77f
BLAKE2b-256 98b0ad1d411224dc7b66401d1d7cafd4cbd9f7acd546d3748658af81e4a5c154

See more details on using hashes here.

File details

Details for the file pycapio-0.0.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pycapio-0.0.1-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 993c2413091ac1fff4b99de8bd8186a9e748ea8d7be6ee9305b8b0c72dd3f1f4
MD5 80389984c7f7cdc9ba74ecb1b4912c20
BLAKE2b-256 3db282f40939a0b03fcee8f97ed9a6de32b720b531f269f77018c666e2444ed6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page