Entity container used throughout ConKit
Entity
(id)[source]¶Bases: object
Base class for all entities used in this interface.
It handles the storage of data. It also provides a high-efficiency methods to allow fast lookup and iterations of each entity. It also provides a hierarchical structure to remember parent and child entities.
Warning
It is strongly advised against the use of the Entity
class directly.
Instead, use one or more of the the remaining data models.
id
¶str, list, tuple – The ID of the selected entity
full_id
¶tuple – A traceback id including all parent classes
child_list
¶list – A list storing the child entities
child_dict
¶dict – A dictionary storing the child entities
child_dict
child_list
full_id
A traceback id including all parent classes
The full id is a tuple containing all id’s starting from
the top object (ContactFile
) down to the current object.
A full id for a Contact
e.g. is something like:
(‘1aa’, 1, (1, 10))
This corresponds to:
ContactFile
identifier => 1aaa
ContactMap
identifier => 1
Contact
identifier => (1, 10)
id
The ID of the selected entity
listify
(s)[source]¶Convert unknown input to a list
Parameters: | s (str, int, float, list, tuple) – |
---|---|
Returns: | The input as list |
Return type: | list |
parent