API reference¶
Everything below is importable directly from the graphty package.
Materialization¶
graphty.ModelMaterializer
¶
ModelMaterializer(
model: type[TModel], data: FrameInitTypes | LazyFrame
)
Configuration¶
graphty.ConfigDict
¶
Bases: ConfigDict
graphty.Opaque
¶
Type for marking a field as opaque to the planner.
For Pydantic fields typed with Annotated[<type>, Opaque()],
the GraphTy planner will forward the entire projection as a pl.Struct
and otherwise ignore that field.
Disengaging the planner for a field with Opaque
allows a before-validator to act on the raw bindings on the Python level.
Aggregations¶
graphty.Reduce
¶
graphty.Collect
¶
Utilities¶
graphty.AliasMap
¶
Bases: UserDict
Custom mapping for resolving Pydantic field validation aliases.
E.g. for a given model
class Point(BaseModel): a: int = Field(alias="x") y: int
the mapping would compute to {"a": "x", "y": y}.
Alias choices, alias generators and alias priority are supported; alias choices are resolved against a projection.
Note that AliasPath is currently not supported.