configuration.rst 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666
  1. .. _configuration:
  2. Configuration
  3. =============
  4. The following configurations are used by FlexMeasures.
  5. Required settings (e.g. postgres db) are marked with a double star (**).
  6. To enable easier quickstart tutorials, continuous integration use cases and basic usage of FlexMeasures within other projects, these required settings, as well as a few others, can be set by environment variables ― this is also noted per setting.
  7. Recommended settings (e.g. mail, redis) are marked by one star (*).
  8. .. note:: FlexMeasures is best configured via a config file. The config file for FlexMeasures can be placed in one of two locations:
  9. * in the user's home directory (e.g. ``~/.flexmeasures.cfg`` on Unix). In this case, note the dot at the beginning of the filename!
  10. * in the app's instance directory (e.g. ``/path/to/your/flexmeasures/code/instance/flexmeasures.cfg``\ ). The path to that instance directory is shown to you by running flexmeasures (e.g. ``flexmeasures run``\ ) with required settings missing or otherwise by running ``flexmeasures shell``. Under :ref:`docker_configuration`, we explain how to load a config file into a FlexMeasures Docker container.
  11. Basic functionality
  12. -------------------
  13. LOGGING_LEVEL
  14. ^^^^^^^^^^^^^
  15. Level above which log messages are added to the log file. See the ``logging`` package in the Python standard library.
  16. Default: ``logging.WARNING``
  17. .. note:: This setting is also recognized as environment variable.
  18. .. _modes-config:
  19. FLEXMEASURES_MODE
  20. ^^^^^^^^^^^^^^^^^
  21. The mode in which FlexMeasures is being run, e.g. "demo" or "play".
  22. This is used to turn on certain extra behaviours, see :ref:`modes-dev` for details.
  23. Default: ``""``
  24. .. _overwrite-config:
  25. FLEXMEASURES_ALLOW_DATA_OVERWRITE
  26. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  27. Whether to allow overwriting existing data when saving data to the database.
  28. Default: ``False``
  29. .. _solver-config:
  30. FLEXMEASURES_LP_SOLVER
  31. ^^^^^^^^^^^^^^^^^^^^^^
  32. The command to run the scheduling solver. This is the executable command which FlexMeasures calls via the `pyomo library <http://www.pyomo.org/>`_. Potential values might be ``cbc``, ``cplex``, ``glpk`` or ``appsi_highs``. Consult `their documentation <https://pyomo.readthedocs.io/en/stable/solving_pyomo_models.html#supported-solvers>`_ to learn more.
  33. We have tested FlexMeasures with `HiGHS <https://highs.dev/>`_ and `Cbc <https://coin-or.github.io/Cbc/intro>`_.
  34. Note that you need to install the solver, read more at :ref:`installing-a-solver`.
  35. Default: ``"appsi_highs"``
  36. FLEXMEASURES_HOSTS_AND_AUTH_START
  37. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  38. Configuration used for entity addressing. This contains the domain on which FlexMeasures runs
  39. and the first month when the domain was under the current owner's administration.
  40. Default: ``{"flexmeasures.io": "2021-01"}``
  41. .. _plugin-config:
  42. FLEXMEASURES_PLUGINS
  43. ^^^^^^^^^^^^^^^^^^^^^^^^^
  44. A list of plugins you want FlexMeasures to load (e.g. for custom views or CLI functions).
  45. This can be a Python list (e.g. ``["plugin1", "plugin2"]``) or a comma-separated string (e.g. ``"plugin1, plugin2"``).
  46. Two types of entries are possible here:
  47. * File paths (absolute or relative) to plugins. Each such path needs to point to a folder, which should contain an ``__init__.py`` file where the Blueprint is defined.
  48. * Names of installed Python modules.
  49. Added functionality in plugins needs to be based on Flask Blueprints. See :ref:`plugins` for more information and examples.
  50. Default: ``[]``
  51. .. note:: This setting is also recognized as environment variable (since v0.14, which is also the version required to pass this setting as a string).
  52. FLEXMEASURES_DB_BACKUP_PATH
  53. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  54. Relative path to the folder where database backups are stored if that feature is being used.
  55. Default: ``"migrations/dumps"``
  56. FLEXMEASURES_PROFILE_REQUESTS
  57. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  58. If True, the processing time of requests are profiled.
  59. The overall time used by requests are logged to the console. In addition, if `pyinstrument` is installed, then a profiling report is made (of time being spent in different function calls) for all Flask API endpoints.
  60. The profiling results are stored in the ``profile_reports`` folder in the instance directory.
  61. Note: Profile reports for API endpoints are overwritten on repetition of the same request.
  62. Interesting for developers.
  63. Default: ``False``
  64. UI
  65. --
  66. FLEXMEASURES_PLATFORM_NAME
  67. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  68. Name being used in headings and in the menu bar.
  69. For more fine-grained control, this can also be a list, where it's possible to set the platform name for certain account roles (as a tuple of view name and list of applicable account roles). In this case, the list is searched from left to right, and the first fitting name is used.
  70. For example, ``("MyMDCApp", ["MDC"]), "MyApp"]`` would show the name "MyMDCApp" for users connected to accounts with the account role "MDC", while all others would see the name "/MyApp".
  71. .. note:: This fine-grained control requires FlexMeasures version 0.6.0
  72. Default: ``"FlexMeasures"``
  73. FLEXMEASURES_MENU_LOGO_PATH
  74. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  75. A URL path to identify an image being used as logo in the upper left corner (replacing some generic text made from platform name and the page title).
  76. The path can be a complete URL or a relative from the app root.
  77. Default: ``""``
  78. .. _extra-css-config:
  79. FLEXMEASURES_EXTRA_CSS_PATH
  80. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  81. A URL path to identify a CSS style-sheet to be added to the base template.
  82. The path can be a complete URL or a relative from the app root.
  83. .. note:: You can also add extra styles for plugins with the usual Blueprint method. That is more elegant but only applies to the Blueprint's views.
  84. Default: ``""``
  85. FLEXMEASURES_ROOT_VIEW
  86. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  87. Root view (reachable at "/"). For example ``"/dashboard"``.
  88. For more fine-grained control, this can also be a list, where it's possible to set the root view for certain account roles (as a tuple of view name and list of applicable account roles). In this case, the list is searched from left to right, and the first fitting view is shown.
  89. For example, ``[("metering-dashboard", ["MDC", "Prosumer"]), "default-dashboard"]`` would route to "/metering-dashboard" for users connected to accounts with account roles "MDC" or "Prosumer", while all others would be routed to "/default-dashboard".
  90. If this setting is empty or not applicable for the current user, the "/" view will be shown (FlexMeasures' default dashboard or a plugin view which was registered at "/").
  91. Default ``[]``
  92. .. note:: This setting was introduced in FlexMeasures version 0.6.0
  93. .. _menu-config:
  94. FLEXMEASURES_MENU_LISTED_VIEWS
  95. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  96. A list of the view names which are listed in the menu.
  97. .. note:: This setting only lists the names of views, rather than making sure the views exist.
  98. For more fine-grained control, the entries can also be tuples of view names and list of applicable account roles. For example, the entry ``("details": ["MDC", "Prosumer"])`` would add the "/details" link to the menu only for users who are connected to accounts with roles "MDC" or "Prosumer". For clarity: the title of the menu item would read "Details", see also the FLEXMEASURES_LISTED_VIEW_TITLES setting below.
  99. .. note:: This fine-grained control requires FlexMeasures version 0.6.0
  100. Default: ``["dashboard"]``
  101. FLEXMEASURES_MENU_LISTED_VIEW_ICONS
  102. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  103. A dictionary containing a Font Awesome icon name for each view name listed in the menu.
  104. For example, ``{"freezer-view": "snowflake-o"}`` puts a snowflake icon (|snowflake-o|) next to your freezer-view menu item.
  105. Default: ``{}``
  106. .. note:: This setting was introduced in FlexMeasures version 0.6.0
  107. FLEXMEASURES_MENU_LISTED_VIEW_TITLES
  108. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  109. A dictionary containing a string title for each view name listed in the menu.
  110. For example, ``{"freezer-view": "Your freezer"}`` lists the freezer-view in the menu as "Your freezer".
  111. Default: ``{}``
  112. .. note:: This setting was introduced in FlexMeasures version 0.6.0
  113. FLEXMEASURES_HIDE_NAN_IN_UI
  114. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  115. Whether to hide the word "nan" if any value in metrics tables is ``NaN``.
  116. Default: ``False``
  117. RQ_DASHBOARD_POLL_INTERVAL
  118. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  119. Interval in which viewing the queues dashboard refreshes itself, in milliseconds.
  120. Default: ``3000`` (3 seconds)
  121. FLEXMEASURES_ASSET_TYPE_GROUPS
  122. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  123. How to group asset types together, e.g. in a dashboard.
  124. Default: ``{"renewables": ["solar", "wind"], "EVSE": ["one-way_evse", "two-way_evse"]}``
  125. FLEXMEASURES_JS_VERSIONS
  126. ^^^^^^^^^^^^^^^^^^^^^^^^
  127. Default: ``{"vega": "5.22.1", "vegaembed": "6.20.8", "vegalite": "5.2.0"}``
  128. Timing
  129. ------
  130. FLEXMEASURES_TIMEZONE
  131. ^^^^^^^^^^^^^^^^^^^^^
  132. Timezone in which the platform operates. This is useful when datetimes are being localized.
  133. Default: ``"Asia/Seoul"``
  134. FLEXMEASURES_JOB_TTL
  135. ^^^^^^^^^^^^^^^^^^^^^^^^^
  136. Time to live for jobs (e.g. forecasting, scheduling) in their respective queue.
  137. A job that is passed this time to live might get cleaned out by Redis' memory manager.
  138. Default: ``timedelta(days=1)``
  139. FLEXMEASURES_PLANNING_TTL
  140. ^^^^^^^^^^^^^^^^^^^^^^^^^
  141. Time to live for schedule UUIDs of successful scheduling jobs. Set a negative timedelta to persist forever.
  142. Default: ``timedelta(days=7)``
  143. FLEXMEASURES_JOB_CACHE_TTL
  144. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  145. Time to live for the job caching keys in seconds. The default value of 1h responds to the reality that within an hour, there is not
  146. much change, other than the input arguments, that justifies recomputing the schedules.
  147. In an hour, we will have more accurate forecasts available and the situation of the power grid
  148. might have changed (imbalance prices, distribution level congestion, activation of FCR or aFRR reserves, ...).
  149. Set a negative value to persist forever.
  150. .. warning::
  151. Keep in mind that unless a proper clean up mechanism is set up, the number of
  152. caching keys will grow with time if the TTL is set to a negative value.
  153. Default: ``3600``
  154. .. _datasource_config:
  155. FLEXMEASURES_DEFAULT_DATASOURCE
  156. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  157. The default DataSource of the resulting data from `DataGeneration` classes.
  158. Default: ``"FlexMeasures"``
  159. .. _planning_horizon_config:
  160. FLEXMEASURES_PLANNING_HORIZON
  161. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  162. The default horizon for making schedules.
  163. API users can set a custom duration if they need to.
  164. Default: ``timedelta(days=2)``
  165. FLEXMEASURES_MAX_PLANNING_HORIZON
  166. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  167. The maximum horizon for making schedules.
  168. API users are not able to request longer schedules.
  169. Can be set to a specific ``datetime.timedelta`` or to an integer number of planning steps, where the duration of a planning step is equal to the resolution of the applicable power sensor.
  170. Set to ``None`` to forgo this limitation altoghether.
  171. Default: ``2520`` (e.g. 7 days for a 4-minute resolution sensor, 105 days for a 1-hour resolution sensor)
  172. Access Tokens
  173. ---------------
  174. .. _mapbox_access_token:
  175. MAPBOX_ACCESS_TOKEN
  176. ^^^^^^^^^^^^^^^^^^^
  177. Token for accessing the MapBox API (for displaying maps on the dashboard and asset pages). You can learn how to obtain one `here <https://docs.mapbox.com/help/glossary/access-token/>`_
  178. Default: ``None``
  179. .. note:: This setting is also recognized as environment variable.
  180. .. _sentry_access_token:
  181. SENTRY_SDN
  182. ^^^^^^^^^^^^
  183. Set tokenized URL, so errors will be sent to Sentry when ``app.env`` is not in `debug` or `testing` mode.
  184. E.g.: ``https://<examplePublicKey>@o<something>.ingest.sentry.io/<project-Id>``
  185. Default: ``None``
  186. .. note:: This setting is also recognized as environment variable.
  187. SQLAlchemy
  188. ----------
  189. This is only a selection of the most important settings.
  190. See `the Flask-SQLAlchemy Docs <https://flask-sqlalchemy.palletsprojects.com/en/master/config>`_ for all possibilities.
  191. SQLALCHEMY_DATABASE_URI (**)
  192. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  193. Connection string to the postgres database, format: ``postgresql://<user>:<password>@<host-address>[:<port>]/<db>``
  194. Default: ``None``
  195. .. note:: This setting is also recognized as environment variable.
  196. SQLALCHEMY_ENGINE_OPTIONS
  197. ^^^^^^^^^^^^^^^^^^^^^^^^^
  198. Configuration of the SQLAlchemy engine.
  199. Default:
  200. .. code-block:: python
  201. {
  202. "pool_recycle": 299,
  203. "pool_pre_ping": True,
  204. "connect_args": {"options": "-c timezone=utc"},
  205. }
  206. SQLALCHEMY_TEST_DATABASE_URI
  207. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  208. When running tests (``make test``, which runs ``pytest``), the default database URI is set in ``utils.config_defaults.TestingConfig``.
  209. You can use this setting to overwrite that URI and point the tests to an (empty) database of your choice.
  210. .. note:: This setting is only supported as an environment variable, not in a config file, and only during testing.
  211. Security
  212. --------
  213. Settings to ensure secure handling of credentials and data.
  214. For Flask-Security and Flask-Cors (setting names start with "SECURITY" or "CORS"), this is only a selection of the most important settings.
  215. See `the Flask-Security Docs <https://flask-security-too.readthedocs.io/en/stable/configuration.html>`_ as well as the `Flask-CORS docs <https://flask-cors.readthedocs.io/en/latest/configuration.html>`_ for all possibilities.
  216. SECRET_KEY (**)
  217. ^^^^^^^^^^^^^^^
  218. Used to sign user sessions and also as extra salt (a.k.a. pepper) for password salting if ``SECURITY_PASSWORD_SALT`` is not set.
  219. This is actually part of Flask - but is also used by Flask-Security to sign all tokens.
  220. It is critical this is set to a strong value. For python3 consider using: ``secrets.token_urlsafe()``
  221. You can also set this in a file (which some Flask tutorials advise).
  222. .. note:: Leave this setting set to ``None`` to get more instructions when you attempt to run FlexMeasures.
  223. Default: ``None``
  224. SECURITY_PASSWORD_SALT
  225. ^^^^^^^^^^^^^^^^^^^^^^
  226. Extra password salt (a.k.a. pepper)
  227. Default: ``None`` (falls back to ``SECRET_KEY``\ )
  228. SECURITY_TOKEN_AUTHENTICATION_HEADER
  229. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  230. Name of the header which carries the auth bearer token in API requests.
  231. Default: ``Authorization``
  232. SECURITY_TOKEN_MAX_AGE
  233. ^^^^^^^^^^^^^^^^^^^^^^
  234. Maximal age of security tokens in seconds.
  235. Default: ``60 * 60 * 6`` (six hours)
  236. SECURITY_TRACKABLE
  237. ^^^^^^^^^^^^^^^^^^
  238. Whether to track user statistics. Turning this on requires certain user fields.
  239. We do not use this feature, but we do track number of logins.
  240. Default: ``False``
  241. CORS_ORIGINS
  242. ^^^^^^^^^^^^
  243. Allowed cross-origins. Set to "*" to allow all. For development (e.g. JavaScript on localhost) you might use "null" in this list.
  244. Default: ``[]``
  245. CORS_RESOURCES:
  246. ^^^^^^^^^^^^^^^
  247. FlexMeasures resources which get cors protection. This can be a regex, a list of them or a dictionary with all possible options.
  248. Default: ``[r"/api/*"]``
  249. CORS_SUPPORTS_CREDENTIALS
  250. ^^^^^^^^^^^^^^^^^^^^^^^^^
  251. Allows users to make authenticated requests. If true, injects the Access-Control-Allow-Credentials header in responses. This allows cookies and credentials to be submitted across domains.
  252. .. note:: This option cannot be used in conjunction with a “*” origin.
  253. Default: ``True``
  254. FLEXMEASURES_FORCE_HTTPS
  255. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  256. Set to ``True`` if all requests should be forced to be HTTPS.
  257. Default: ``False``
  258. FLEXMEASURES_ENFORCE_SECURE_CONTENT_POLICY
  259. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  260. When ``FLEXMEASURES_ENFORCE_SECURE_CONTENT_POLICY`` is set to ``True``, the ``<meta>`` tag with the ``Content-Security-Policy`` directive, specifically ``upgrade-insecure-requests``, is included in the HTML head. This directive instructs the browser to upgrade insecure requests from ``http`` to ``https``. One example of a use case for this is if you have a load balancer in front of FlexMeasures, which is secured with a certificate and only accepts https.
  261. Default: ``False``
  262. .. _mail-config:
  263. Mail
  264. ----
  265. For FlexMeasures to be able to send email to users (e.g. for resetting passwords), you need an email account which can do that (e.g. GMail).
  266. This is only a selection of the most important settings.
  267. See `the Flask-Mail Docs <https://flask-mail.readthedocs.io/en/latest/#configuring-flask-mail>`_ for others.
  268. .. note:: The mail settings are also recognized as environment variables.
  269. MAIL_SERVER (*)
  270. ^^^^^^^^^^^^^^^
  271. Email name server domain.
  272. Default: ``"localhost"``
  273. MAIL_PORT (*)
  274. ^^^^^^^^^^^^^
  275. SMTP port of the mail server.
  276. Default: ``25``
  277. MAIL_USE_TLS
  278. ^^^^^^^^^^^^
  279. Whether to use TLS.
  280. Default: ``False``
  281. MAIL_USE_SSL
  282. ^^^^^^^^^^^^
  283. Whether to use SSL.
  284. Default: ``False``
  285. MAIL_USERNAME (*)
  286. ^^^^^^^^^^^^^^^^^
  287. Login name of the mail system user.
  288. Default: ``None``
  289. MAIL_DEFAULT_SENDER (*)
  290. ^^^^^^^^^^^^^^^^^^^^^^^
  291. Tuple of shown name of sender and their email address.
  292. .. note:: Some recipient mail servers will refuse emails for which the shown email address (set under ``MAIL_DEFAULT_SENDER``) differs from the sender's real email address (registered to ``MAIL_USERNAME``).
  293. Match them to avoid ``SMTPRecipientsRefused`` errors.
  294. Default:
  295. .. code-block:: python
  296. (
  297. "FlexMeasures",
  298. "no-reply@example.com",
  299. )
  300. MAIL_PASSWORD
  301. ^^^^^^^^^^^^^^^^^^^^^^^
  302. Password of mail system user.
  303. Default: ``None``
  304. .. _monitoring
  305. Monitoring
  306. -----------
  307. Monitoring potential problems in FlexMeasure's operations.
  308. SENTRY_DSN
  309. ^^^^^^^^^^^^
  310. Set tokenized URL, so errors will be sent to Sentry when ``app.env`` is not in `debug` or `testing` mode.
  311. E.g.: ``https://<examplePublicKey>@o<something>.ingest.sentry.io/<project-Id>``
  312. Default: ``None``
  313. FLEXMEASURES_SENTRY_CONFIG
  314. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  315. A dictionary with values to configure reporting to Sentry. Some options are taken care of by FlexMeasures (e.g. environment and release), but not all.
  316. See `here <https://docs.sentry.io/platforms/python/configuration/options/>_` for a complete list.
  317. Default: ``{}``
  318. FLEXMEASURES_TASK_CHECK_AUTH_TOKEN
  319. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  320. Token which external services can use to check on the status of recurring tasks within FlexMeasures.
  321. Default: ``None``
  322. .. _monitoring_mail_recipients:
  323. FLEXMEASURES_MONITORING_MAIL_RECIPIENTS
  324. ^^^^^^^^^^^^^^^^^^^^^^^
  325. E-mail addresses to send monitoring alerts to from the CLI task ``flexmeasures monitor tasks``. For example ``["fred@one.com", "wilma@two.com"]``
  326. Default: ``[]``
  327. .. _redis-config:
  328. Redis
  329. -----
  330. FlexMeasures uses the Redis database to support our forecasting and scheduling job queues.
  331. .. note:: The redis settings are also recognized as environment variables.
  332. FLEXMEASURES_REDIS_URL (*)
  333. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  334. URL of redis server.
  335. Default: ``"localhost"``
  336. FLEXMEASURES_REDIS_PORT (*)
  337. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  338. Port of redis server.
  339. Default: ``6379``
  340. FLEXMEASURES_REDIS_DB_NR (*)
  341. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  342. Number of the redis database to use (Redis per default has 16 databases, numbered 0-15)
  343. Default: ``0``
  344. FLEXMEASURES_REDIS_PASSWORD (*)
  345. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  346. Password of the redis server.
  347. Default: ``None``
  348. Demonstrations
  349. --------------
  350. .. _demo-credentials-config:
  351. FLEXMEASURES_PUBLIC_DEMO_CREDENTIALS
  352. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  353. When ``FLEXMEASURES_MODE=demo``\ , this can hold login credentials (demo user email and password, e.g. ``("demo at seita.nl", "flexdemo")``\ ), so anyone can log in and try out the platform.
  354. Default: ``None``
  355. .. _sunset-config:
  356. Sunset
  357. ------
  358. FLEXMEASURES_API_SUNSET_ACTIVE
  359. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  360. Allow control over the effect of sunsetting API versions.
  361. Specifically, if True, the endpoints of sunset API versions will return ``HTTP status 410 (Gone)`` status codes.
  362. If False, these endpoints will either return ``HTTP status 410 (Gone) status codes``, or work like before (including Deprecation and Sunset headers in their response), depending on whether the installed FlexMeasures version still contains the endpoint implementations.
  363. Default: ``False``
  364. FLEXMEASURES_API_SUNSET_DATE
  365. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  366. Allow to override the default sunset date for your clients.
  367. Default: ``None`` (defaults are set internally for each sunset API version, e.g. ``"2023-05-01"`` for v2.0)
  368. FLEXMEASURES_API_SUNSET_LINK
  369. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  370. Allow to override the default sunset link for your clients.
  371. Default: ``None`` (defaults are set internally for each sunset API version, e.g. ``"https://flexmeasures.readthedocs.io/en/v0.13.0/api/v2_0.html"`` for v2.0)