betty.model.collections module¶
Entity collections.
- class betty.model.collections.EntityCollection[source]¶
-
Provide a collection of entities.
- property view: Sequence[_TargetT & Entity]¶
A view of the entities at the time of calling.
- class betty.model.collections.MultipleTypesEntityCollection[source]¶
Bases:
Generic
[_TargetT
],EntityCollection
[_TargetT
]Collect entities of multiple types.
- __init__(*entities: _TargetT & Entity, entity_type_id_to_type_mapping: PluginIdToTypeMapping[Entity])[source]¶
- class betty.model.collections.SingleTypeEntityCollection[source]¶
Bases:
Generic
[_TargetT
],EntityCollection
[_TargetT
]Collect entities of a single type.
- betty.model.collections.record_added(entities: EntityCollection[_EntityT]) AsyncIterator[MultipleTypesEntityCollection[_EntityT]] [source]¶
Record all entities that are added to a collection.