_population
Module Contents
Classes
Generic SQLAlchemy model for a population. |
Attributes
- TIndividual
- class Population
Bases:
experimentation.database.HasId
,sqlalchemy.orm.MappedAsDataclass
,Generic
[TIndividual
]Generic SQLAlchemy model for a population.
Inherit from this to create your own population type.
The generic parameter TIndividual refers to the user-defined individual type. This parameter cannot be a forward reference.
For example:
class MyPopulation(Base, Population[MyIndividual]): __tablename__ = "my_population"
- classmethod __init_subclass__(/, **kwargs: dict[str, Any]) None
Initialize a version of this class when it is subclassed.
Gets the actual type of TIndividual and stores it for later use.
- Parameters:
kwargs – Remaining arguments passed to super.