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.
Get set up
Section titled “Get set up”Install the published package, choose an environment, and verify first use.
Start with a working example
Section titled “Start with a working example”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.
Find your task
Section titled “Find your task”- Tutorials: learn through small examples.
- How to guides: configure files, implement plugins, and apply rules.
- Reference/API: public API and configuration contracts.
- Explanation: architecture and data flow.
- Troubleshooting: imports, input lookup, and lifecycle errors.
- Changelog: release history.
- Contributors: setup and checks.