policyengine_core.entities module contains the classes that define how entities (and group entities) function.
- class policyengine_core.entities.entity.Entity(key: str, plural: str, label: str, doc: str)#
Represents an entity (e.g. a person, a household, etc.) on which calculations can be run.
- check_role_validity(role: Any) None #
- check_variable_defined_for_entity(variable_name: str) None #
- get_variable(variable_name: str, check_existence: bool = False)#
- set_tax_benefit_system(tax_benefit_system) None #
- class policyengine_core.entities.group_entity.GroupEntity(key: str, plural: str, label: str, doc: str, roles: List[str], containing_entities: List[str] = ())#
Represents an entity containing several others with different roles.
key – A key to identify the group entity.
plural – The
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.
- class policyengine_core.entities.role.Role(description, entity)#
The type of the relation between an entity instance and a group entity instance.