Entities#
The policyengine_core.entities module contains the classes that define how entities (and group entities) function.
Entity#
GroupEntity#
- class policyengine_core.entities.group_entity.GroupEntity(key: str, plural: str, label: str, doc: str, roles: List[str], containing_entities: List[str] = ())[source]#
Bases:
EntityRepresents an entity containing several others with different roles.
A
GroupEntityrepresents anEntitycontaining several otherEntitywith differentRole, and on which calculations can be run.- Parameters:
key – A key to identify the group entity.
plural – The
key, pluralised.label – A summary description.
doc – A full description.
roles – The list of
Roleof the group entity.containing_entities – The list of keys of group entities whose members are guaranteed to be a superset of this group’s entities.
Changed in version 35.7.0: Added
containing_entities, that allows the defining of group entities which entirely contain other group entities.