This repository contains the Python bindings for the Cartesi machine guest library (libcma). The bindings expose libcma’s C API (parser, and ledger) for utilization in python applications as an object. The library is written in cython and it should be compiled for the system. This would serve as an alternative to the HttpServer and offer methods to manage a Cartesi application instance.
The repo includes:
- Library:
pycma— the main cython library definition. - Sample apps:
wallet_app - Tests:
/testsUtilizes cartesapp to test the sample application which uses the libcma-python-bindings.
- Docker — for building the RISC-V image and running the Cartesi machine.
- Python 3.12+ — for the test suite (cartesapp).
You can use pip to install:
pip3 install pycma --find-links https://prototyp3-dev.github.io/pip-wheels-riscv/wheels/Note: the wheels are already compiled at https://prototyp3-dev.github.io/pip-wheels-riscv/wheels/. Alternatively you can install directly from the repo:
pip3 install pycma@git+https://github.com/Mugen-Builders/libcma-binding-python