flowbber.inputs

Input pipeline definition formats parses.

Functions

flowbber.inputs.replace_values(definition, path)

Perform string replacement on both keys and values of an arbitrarily nested dictionary data structure.

The namespaces for the replacements are loaded with flowbber.namespaces.get_namespaces().

Parameters
  • definition (dict) – the pipeline definition data structure.
  • path (Path) – Path to the pipeline definition file.
Returns

The pipeline definition data structure with all string keys and values replaced with values in the namespace.

Return type

dict

flowbber.inputs.validate_definition(definition)

Validate given pipeline definition against the schema.

Raises
SyntaxError – if invalid pipeline definition.
Parameters
definition (dict) – The pipeline definition dictionary data structure.
Returns
The normalized and validated pipeline definition. This will include the default values of all optional attributes.
Return type
dict
flowbber.inputs.load_pipeline(path)

Load, replace and validate the pipeline definition file.

  • Path can be in any of the supported file formats.
  • Replacement values will be performed with the available namespaces.
  • Schema validation will be performed.
Parameters
path (Path) – Path to the pipeline definition file.
Returns
A dictionary data structure with the pipeline definition.
Return type
dict