haive.core.graph.state_graph.serializableΒΆ
from typing import Any, Dict. Serialization support for BaseGraph.
This module provides serialization and deserialization utilities for BaseGraph, enabling graphs to be stored, loaded, and exchanged with minimal information loss.
ClassesΒΆ
Serializable representation of a Branch. |
|
Serializable representation of the BaseGraph. |
|
Serializable representation of a Node. |
|
Reference to a type that can be serialized. |
Module ContentsΒΆ
- class haive.core.graph.state_graph.serializable.SerializableBranch(/, **data)[source]ΒΆ
Bases:
pydantic.BaseModel
Serializable representation of a Branch.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class haive.core.graph.state_graph.serializable.SerializableGraph(/, **data)[source]ΒΆ
Bases:
pydantic.BaseModel
Serializable representation of the BaseGraph.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- classmethod from_graph(graph)[source]ΒΆ
Create a serializable representation from a BaseGraph.
- Return type:
Any
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class haive.core.graph.state_graph.serializable.SerializableNode(/, **data)[source]ΒΆ
Bases:
pydantic.BaseModel
Serializable representation of a Node.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class haive.core.graph.state_graph.serializable.TypeReference(/, **data)[source]ΒΆ
Bases:
pydantic.BaseModel
Reference to a type that can be serialized.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- Parameters:
data (Any)
- classmethod from_type(type_obj)[source]ΒΆ
From Type.
- Parameters:
type_obj β [TODO: Add description]
- Returns:
Add return description]
- Return type:
[TODO
- model_configΒΆ
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].