module documentation
Convenient functions for making use of yamlpath.
Function | guess |
Suggest an alternative schema, with low confidence. |
Function | mk |
Construct a YAML editor with load and dump methods. |
Function | mk |
Construct a YAML Path processor/document for the data. |
Function | non |
Generate NodeCoords matching any query_paths. |
Function | typed |
Analyze nested data and produce a matching schema document. |
Function | _schema |
Undocumented |
Suggest an alternative schema, with low confidence.
Parameters | |
schema:dict[ | A map of type names ('date', 'boolean', 'number', 'null') to lists of YAML Paths. |
Returns | |
dict[ | A dumb guess at an alternative schema that matches more patterns and fewer literal paths. |
Construct a YAML editor with load and dump methods.
Returns | |
YAML | A configured object able to .load and .dump YAML (ruamel.yaml.main.YAML). |
Construct a YAML Path processor/document for the data.
Parameters | |
data:dict | list | An object from which to create the processor, or "surgeon." |
Returns | |
Processor | A document object able to .set_value and .get_nodes (yamlpath.Processor). |
Generate NodeCoords matching any query_paths.
Omit any matches whose node attr is None.
Parameters | |
surgeon:Processor | A yamlpath.Processor, already storing the YAML document to be queried. |
*querystr | YAMLPath query strs to find matches for in the document. |
Returns | |
Iterable[ | Undocumented |
Yields | |
|