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:
Entity
Represents an entity containing several others with different roles.
A
GroupEntity
represents anEntity
containing several otherEntity
with 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
Role
of 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.