The Meta object

Meta is an important object that is used to keep track of our position in the original val when we are normalising it.

Note that the Meta object can be imported directly from delfick_project.norms

class delfick_project.norms.meta.Meta(everything, path)

Meta has a concept of the wider context, kept as the everything property, and the path into everything where we are.

We move around the everything by creating new instances of Meta that refers to a new part: using the methods on the meta object.

classmethod empty()

Return a Meta with empty configuration and empty path

__init__(everything, path)
The wider context

Can be given as a string or a list of tuples.

If provided as a string, it is converted to [(path, "")]


Return a new instance with (path, "") added to the path


Return a new instance with ("", "[index]") added to the path


Return {_key_name_<i>: <i'th part of path>} for each part in the path reversed


Work out if we have the same everything and path


Work out if the str(everything) < str(other.everything) and path < other.path.


Work out if we are not equal or less than other