Entities

class openfisca_core.entities.Role(description, entity)[source]
class openfisca_core.entities.Entity(key, plural, label, doc)[source]

Represents an entity (e.g. a person, a household, etc.) on which calculations can be run.

class openfisca_core.entities.GroupEntity(key, plural, label, doc, roles, containing_entities=())[source]

Represents an entity containing several others with different roles.

A GroupEntity represents an Entity containing several other Entity with different Role, 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.