Skip to content

r2x-core

r2x-core is a Python library for developers building power system translators. It supplies the shared pieces for reading input files, constructing typed components, applying transformations, and exporting an inspectable system. Configuration, plugin lifecycle hooks, rule mappings, and unit handling help model packages use the same workflow instead of rebuilding that infrastructure.

Model plugins provide the knowledge of a particular model’s files and conventions: its parser reads that format, and its exporter writes the target format. r2x-cli is a separate Rust command line tool that installs plugins and runs them in pipelines. Use core to write or test a plugin. Use the CLI to run installed translators. Start with the CSV capacity example to see these boundaries without external model datasets.

Install the published package, choose an environment, and verify first use.

Read a CSV and build a system without external model datasets. Use the generated API reference to inspect signatures, types, defaults, return values, and pinned implementation source.