flexmeasures.data.models.automations

Automations: recurring tasks (for now: forecasting) defined per asset.

Classes

class flexmeasures.data.models.automations.Automation(**kwargs)

A recurring task on an asset, such as computing forecasts.

The recurrence is defined by a cron string, and the work to be done is defined by a data generator (e.g. a forecaster, linked through a data source) together with the parameters to call it with.

__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

query: t.ClassVar[Query]

A SQLAlchemy query for a model. Equivalent to db.session.query(Model). Can be customized per-model by overriding query_class.

Warning

The query interface is considered legacy in SQLAlchemy. Prefer using session.execute(select()) instead.