High-level interface to grid pools for the Frequenz platform.
TODO(cookiecutter): Improve the README file
The following platforms are officially supported (tested):
- Python: 3.11
- Operating System: Ubuntu Linux 20.04
- Architectures: amd64, arm64
This package ships the gridpool-cli command with three subcommands.
Set the Assets API credentials before running the CLI:
export ASSETS_API_URL="grpc://..."
export ASSETS_API_AUTH_KEY="..."
export ASSETS_API_SIGN_SECRET="..."gridpool-cli print-formulas <microgrid_id>Optional prefix formatting:
gridpool-cli print-formulas <microgrid_id> --prefix "{microgrid_id}.{component}"Rendering requires optional dependencies. Install with:
pip install frequenz-gridpool[render-graph]gridpool-cli render-graph <microgrid_id>To save without opening a window:
gridpool-cli render-graph <microgrid_id> --no-show --output component_graph.pngDerive metadata, formulas and component IDs for one or more microgrids from the Assets API and print them as dotted-key TOML to stdout:
gridpool-cli generate-config <microgrid_id> [<microgrid_id> ...]Redirect stdout to save the result:
gridpool-cli generate-config <microgrid_id> > microgrid.tomlYou can layer existing config files with the Assets API by precedence
(--default < Assets API < --override). Values from a --default file are
overridden by the API, while a --override file keeps its own values and the
API only fills the gaps:
gridpool-cli generate-config <microgrid_id> \
--default defaults.toml \
--override overrides.toml > microgrid.tomlIf no microgrid IDs are given, they are taken from the supplied files:
gridpool-cli generate-config --override existing.toml > microgrid.tomlIf you want to know how to build this project and contribute to it, please check out the Contributing Guide.