haive.core.common.structures.tree_leaf.auto¶
Auto-tree functionality for automatic tree generation from BaseModels.
This module provides the AutoTree class that automatically generates tree structures from Pydantic BaseModels, handling nested structures and Union types.
Classes¶
Placeholder for AutoTree functionality. |
Functions¶
|
Create a tree structure automatically from a BaseModel instance. |
Module Contents¶
- class haive.core.common.structures.tree_leaf.auto.AutoTree[source]¶
Placeholder for AutoTree functionality.
TODO: Implement auto-tree generation from BaseModel inspection.
- haive.core.common.structures.tree_leaf.auto.auto_tree(model, content_extractor=None)[source]¶
Create a tree structure automatically from a BaseModel instance.
- Parameters:
model (T) – The BaseModel instance to convert to a tree.
content_extractor (collections.abc.Callable[[pydantic.BaseModel], pydantic.BaseModel] | None) – Optional function to extract content from models.
- Returns:
A TreeNode representing the model structure.
- Return type:
haive.core.common.structures.tree_leaf.base.TreeNode[haive.core.common.structures.tree_leaf.generics.DefaultContent, haive.core.common.structures.tree_leaf.generics.DefaultResult]