betty.model.collections module¶
Entity collections.
- class betty.model.collections.EntityCollection[source]¶
-
Provide a collection of entities.
- property view: list[_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.
- 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]) Iterator[MultipleTypesEntityCollection[_EntityT]] [source]¶
Record all entities that are added to a collection.