flexmeasures.utils.config_defaults
Our configuration requirements and defaults
This can be adjusted per environment here. Anything confidential should be handled outside of source control (e.g. a SECRET KEY file is generated on first install, and confidential settings can be set via the <app-env>-conf.py file.
Classes
- class flexmeasures.utils.config_defaults.Config
If there is a useful default value, set it here. Otherwise, set to None, so that it can be set either by subclasses or the env-specific config script.
- RQ_DASHBOARD_JSON_ENCODER
alias of
CustomEncoder
- class flexmeasures.utils.config_defaults.CustomEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)
- default(obj)
Implement this method in a subclass such that it returns a serializable object for
o, or calls the base implementation (to raise aTypeError).For example, to support arbitrary iterators, you could implement default like this:
def default(self, o): try: iterable = iter(o) except TypeError: pass else: return list(iterable) # Let the base class default method raise the TypeError return super().default(o)
- class flexmeasures.utils.config_defaults.DevelopmentConfig
- class flexmeasures.utils.config_defaults.DocumentationConfig
- class flexmeasures.utils.config_defaults.ProductionConfig
- class flexmeasures.utils.config_defaults.StagingConfig