flexmeasures.cli

Modules

flexmeasures.cli.data_add

CLI commands for populating the database

flexmeasures.cli.data_delete

CLI commands for removing data

flexmeasures.cli.data_edit

CLI commands for editing data

flexmeasures.cli.data_show

CLI commands for listing database contents and classes

flexmeasures.cli.db_ops

CLI commands for saving, resetting, etc of the database

flexmeasures.cli.jobs

CLI commands for controlling jobs

flexmeasures.cli.monitor

CLI commands for monitoring functionality.

flexmeasures.cli.utils

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)