R3XA_API
Python SDK, MATLAB binding, and WebUI for creating, validating, and visualising R3XA metadata documents.
Documentation · Public WebUI · Python quick start
The GitLab Pages WebUI is a static application. Editing, validation, Registry item checks, and graph generation run in the browser. It does not upload user documents to an R3XA backend.
The three repositories
| Repository | Responsibility |
|---|---|
| R3XA_SPEC | Normative JSON Schema for the format. |
| R3XA_API | Python SDK, MATLAB binding, WebUI, derived models and validators. |
| R3XA_REGISTRY | Shareable, validated R3XA items. |
R3XA_API packages the published schema from R3XA_SPEC; it does not define an
independent format. The registry/ folder here is a small bundled example and
test catalogue, separate from the canonical R3XA_REGISTRY repository and from
items stored locally in a user's browser.
Install the Python SDK
The stable 2.0.0 release targets schema 2026.9.24 and is not source
compatible with the 1.x series. Install it from PyPI:
python -m pip install --upgrade r3xa-api==2.0.0
To work on develop instead, clone the repository and install it in an
activated virtual environment:
git clone --branch develop https://gitlab.com/photomechanics/R3XA_API.git
cd R3XA_API
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .
On Windows PowerShell, activate with .venv\Scripts\Activate.ps1. Python
3.9 and newer are supported. The standard SDK includes Pydantic and a
bundled Graphviz WebAssembly backend; a system dot installation is optional.
Create a document
from r3xa_api import R3XAFile
document = R3XAFile(
title="Tensile test",
description="First specimen",
authors=[{"name": "A. Example"}],
date="2026-09-24",
)
light = document.add_generic_setting(
title="Laboratory lighting",
description="Diffuse LED illumination",
)
assert document.settings[0] is light
document.validate()
document.save("experiment.json")
document.plot("experiment.svg")
The SDK uses schema-generated Pydantic objects. Item references retain object
identity in Python and become IDs in the saved JSON. validate() returns
None on success and raises on failure.
For a progressive introduction, follow the
interactive tutorials
in Python, Jupyter, or Marimo. A MATLAB introductory tutorial and larger
torsion and Qi Hu cases are also maintained under examples/tutorials/ and
examples/cases/. Generated JSON and graph outputs are kept separately in
artifacts/examples/.
WebUI and notebooks
Use the public WebUI directly, or build the same static site from a source checkout:
python -m pip install -e ".[web,dev]"
npm ci --prefix r3xa_web
python scripts/dev.py build-static-web
python scripts/dev.py serve-static-web --no-build --port 8080
The static files in dist/r3xa-webui/ can be copied to any HTTP static host.
The FastAPI runtime remains available to contributors:
python -m pip install -e ".[web]"
python scripts/dev.py run-web --port 8002
To launch the tutorial browsers from the repository root, install the matching extra and start one server:
python -m pip install -e ".[jupyter]"
jupyter notebook --no-browser --ip=127.0.0.1 --port=8888 --notebook-dir=.
python -m pip install -e ".[marimo]"
marimo edit --host 127.0.0.1 --port 2720
See the WebUI guide and tutorial guide for details. The companion MATLAB binding creates JSON without requiring a Python runtime inside MATLAB.
Contribute and verify
python scripts/dev.py setup-dev
python -m pytest -q
python scripts/dev.py test-static-web
python scripts/dev.py build-docs
Work on develop; schema changes belong first in R3XA_SPEC. The
developer workflow
explains schema synchronisation, model generation, CI, and WebUI builds.
Metadata
Release files for r3xa-api 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| r3xa_api-2.0.0.tar.gz | 894.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| r3xa_api-2.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.8 MB
Release files / r3xa_api-2.0.0.tar.gz
| Download URL | r3xa_api-2.0.0.tar.gz |
|---|---|
| Size | 894.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c7a468c77d7c7cc4becd50289c9d0864ab895b62772e2726bb42da030f6aeffe
|
|
BLAKE2b-256 checksum How to use checksums |
fa2b56659afaf2395ccb4a42a270dfde336182ee212386bf1875da9e68f23b4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / r3xa_api-2.0.0-py3-none-any.whl
| Download URL | r3xa_api-2.0.0-py3-none-any.whl |
|---|---|
| Size | 901.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
365bee1051526b00178d342435bd43b022e78cb791112e857a1c5017d1665ffd
|
|
BLAKE2b-256 checksum How to use checksums |
b7bc4b7bc2d817e86b61f613aca8796f2b46838bc1daab9625b11771a1218dad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for r3xa-api 2.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.