flexmeasures.app
Starting point of the Flask application.
Functions
- flexmeasures.app.create(env: str | None = None, path_to_config: str | None = None, plugins: list[str] | None = None) Flask
Create a Flask app and configure it.
Set the environment by setting FLEXMEASURES_ENV as environment variable (also possible in .env). Or, overwrite any FLEXMEASURES_ENV setting by passing an env in directly (useful for testing for instance).
A path to a config file can be passed in (otherwise a config file will be searched in the home or instance directories).
Also, a list of plugins can be set. Usually this works as a config setting, but this is useful for automated testing.