flexmeasures.cli
Modules
CLI commands for populating the database |
|
CLI commands for removing data |
|
CLI commands for editing data |
|
CLI commands for listing database contents and classes |
|
CLI commands for saving, resetting, etc of the database |
|
CLI commands for controlling jobs |
|
CLI commands for monitoring functionality. |
|
Utils for FlexMeasures CLI |
CLI functions for FlexMeasures hosts.
Functions
- flexmeasures.cli.is_running() bool
True if we are running one of the custom FlexMeasures CLI commands.
We use this in combination with authorization logic, e.g. we assume that only sysadmins run commands there, but also we consider forecasting & scheduling jobs to be in that realm, as well.
This tooling might not live forever, as we could evolve into a more sophisticated auth model for these cases. For instance, these jobs are queued by the system, but caused by user actions (sending data), and then they are run by the system.
See also: the run_as_cli test fixture, which uses the (non-public) PRETEND_RUNNING_AS_CLI env setting.
- flexmeasures.cli.register_at(app: Flask)