Version: 0.0.5 (stable)
agrag.common.data_models.graph_schema.Cardinality
Bases: BaseModel
Declared limits on distinct endpoints of one relation, across its patterns.
Limits describe the schema but do not constrain extracted edges.
Attributes:
- max_per_source (
int | None) – Maximum targets per source. None means no limit. - max_per_target (
int | None) – Maximum sources per target. None means no limit.
max_per_source
max_per_source: int | None = Field(default=None, ge=1)
max_per_target
max_per_target: int | None = Field(default=None, ge=1)
model_config
model_config = ConfigDict(extra='forbid')