Configuration utilities (pyobs.utils.config)

pre_process_yaml(config: str) str[source]

Replaces blocks of the form {include <source.yaml> <key>} in the loaded config file. This allows to use (parts of) another config file. :Parameters: config – directory of the main YAML file

Returns:

Modified version of the input config file with replaced include-blocks.

Structured config schema (pyobs.utils.config_schema)

ConfigSchema is the type IStructuredConfig publishes as its capabilities value, describing a module’s structured, UI-editable configuration fields.

class ConfigSchema(fields: 'dict[str, ConfigFieldSchema]')[source]
class ConfigFieldSchema(type: 'str', unit: 'Unit | None' = None, options: 'list[str] | None' = None, default: 'Any | None' = None, nested: 'dict[str, ConfigFieldSchema] | None'=None, level: 'AccessLevel' = <AccessLevel.BASIC: 0>, description: 'str | None' = None)[source]