Skip to content
NatLabRockiesPublic

About

R2X framework core package

Resources

Contributing

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

147 Commits

Folders and files

Repository files navigation

R2X framework logo

r2x-core

Shared Python tools for power system translators.

CI PyPI Last commit Docs
Python 3.11 to 3.14 Managed with uv BSD 3 clause


r2x-core provides typed plugin configuration, lifecycle hooks, file readers, rule mappings, and unit handling for systems. Model packages implement parsers and exporters. r2x-cli installs and runs them in its own managed Python environment. r2x-core is a library and does not install the r2x executable.

Quick Start

Install

Use Python 3.11 through 3.14. In an activated virtual environment:

python -m pip install r2x-core

Polars is a runtime dependency for the table reader and processor included with r2x-core. It loads only when needed, so importing configuration does not load it. Applications can provide their own FileReader and TabularProcessor. See Installation for environment and upgrade instructions.

Verify the installation and create a system:

python -c "from r2x_core import System; print(System(name='example').name)"

Expect example. Continue with the CSV capacity tutorial to build, transform, export, and independently reload a system.

Documentation

Use the guide that matches your task:

See the documentation site for the complete guide map.

Development

Install uv, a supported Python version, Node.js 22.22 or newer for the docs, and mise. From a source checkout:

mise run setup
mise run hooks
mise run test

Build the searchable documentation site:

npm ci --prefix docs
mise run docs

See Contributing for setup and checks, and the r2x-core agent skill for additional development workflows.

License

BSD license with three clauses. See LICENSE.txt for the full license text.

About

R2X framework core package

Resources

Contributing

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages