These functions return cattrs.Converter instances.
Each Converter has an unstructure method, which takes an object (usually a dict or YAML equivalent), and returns a new one whose elements have been traversed and transformed.
The purpose is usually to prepare data for export into a given format, with its particular type support.
Function | mk |
Create a new recursively unstructuring cattrs.Converter. |
Function | mk |
Create a Converter which unstructures into JSON-supported types. |
Function | mk |
Create a Converter which unstructures into plain str/list/dict objects. |
Function | mk |
Create a Converter which unstructures into TOML-supported types. |
Function | mk |
Create a recursive Converter which replaces marked strs with time instances. |
Function | mk |
Create a Converter which unstructures into YAML-supported types. |
Function | _timestamp |
Create a plain Python datetime.date or datetime.datetime. |
Create a new recursively unstructuring cattrs.Converter.
It can traverse dicts, lists, and their ruamel.yaml equivalents. The other Converters here use this as a starting point, before adding more unstructuring hooks.
Returns | |
Converter | A new, recursively unstructuring cattrs.Converter. |
Create a Converter which unstructures into JSON-supported types.
Returns | |
Converter |
|
Create a Converter which unstructures into plain str/list/dict objects.
This might alternatively have been named mk_nestedtext_types_converter.
Returns | |
Converter |
|
Create a Converter which unstructures into TOML-supported types.
Returns | |
Converter |
|
Create a recursive Converter which replaces marked strs with time instances.
Parameters | |
timestr | An arbitrary prefix (such as a UUID) which, when encountered, indicates the remainder of the containing str should be processed as ISO 8601 and the element replaced by a datetime.time instance. |
Returns | |
Converter |
|
Create a Converter which unstructures into YAML-supported types.
Returns | |
Converter |
|