get_all_maps

get dict of all parent and child maps

Generates a dictionary of all the MaciDataObj's currently mapped parent and child attribute name references, and returns a dict representation of the maps. This method currently has no parameters.

Useful if it is desired to view or reference all currently mapped attribute names.

data.get_all_maps() -> dict[str, dict[str, Any]

Basic Example of getting a dict of all the currently mapped attribute names of the MaciDataObj

dict_data = data.get_all_maps()

In this example, we simply use the get_all_maps method on the MaciDataObj to get a generated copy of the currently mapped parent and child attribute name references, currently held inside the maci object, as a dictionary, and assign the returned dict data to a variable.

Each map has its own dedicated key name. Examples below show empty maps and maps with a basic reference.

Example output of empty maps showing dedicated key names

{'parent_maps': {}, 'child_maps': {}}

Example output of maps with basic references

{'parent_maps': {'attr1': {'attr2': 'attr1'}}, 'child_maps': {'attr2': 'attr1'}}

Parent maps will have their own parent key name matching its attribute name with a value to all child maps referencing the parent attribute name.

Child maps will have their own child key name matching its attribute name with a value to the parent attribute name they are referencing.

For more information on the mapping concept, see Map Assignment Glyph in the language section and map_attr.

partner methods

Methods that provide related utility to this method

map_attr -> Map an attribute name unmap_attr -> Unmap an attribute name

Last updated