pandagg.tree.mapping module

class pandagg.tree.mapping.Mapping(*args, **kwargs)[source]

Bases: pandagg.tree._tree.Tree

KEY = None
get(key)[source]

Get a node by its id. :param nid: str, identifier of node to fetch :rtype: lighttree.node.Node

list_nesteds_at_field(field_path)[source]
mapping_type_of_field(field_path)[source]
nested_at_field(field_path)[source]
node_class

alias of pandagg.node.mapping.abstract.Field

node_path(nid)[source]
resolve_path_to_id(path)[source]
to_dict(from_=None, depth=None)[source]
validate_agg_node(agg_node, exc=True)[source]

Ensure if node has field or path that it exists in mapping, and that required aggregation type if allowed on this kind of field. :param agg_node: AggNode you want to validate on this mapping :param exc: boolean, if set to True raise exception if invalid :rtype: boolean