Skip to content

antikythera_orchestrator.storage.redis_storage ¤

Classes¤

BlueprintStorage ¤

BlueprintStorage()

Functions¤

add_blueprint ¤
add_blueprint(blueprint: Blueprint) -> None

Store a blueprint with searchable metadata.

Parameters:

  • blueprint (Blueprint) –

    The blueprint to store.

get_blueprint ¤
get_blueprint(blueprint_id: str) -> Blueprint

Retrieve a blueprint by its ID.

Parameters:

  • blueprint_id (str) –

    The ID of the blueprint to retrieve.

Returns:

  • Blueprint | None

    The blueprint if found, None otherwise.

list_blueprints ¤
list_blueprints() -> list[dict[str, Any]]

List all available blueprints in the database.

Returns:

  • list[dict[str, Any]]

    A list of blueprint metadata dictionaries containing id, name, version, description, and task_count.

remove_blueprint ¤
remove_blueprint(blueprint_id: str) -> None

Remove a blueprint from the database.

Parameters:

  • blueprint_id (str) –

    The ID of the blueprint to remove.

Raises:

ModelStorage ¤

ModelStorage()

Functions¤

add_model ¤
add_model(model_id: str, model: Any) -> None

Store a model.

Parameters:

  • model_id (str) –

    The ID of the model.

  • model (Any) –

    The model to store (must be COMPAS serializable).

add_nesting ¤
add_nesting(model_id: str, nesting: Any) -> None

Store a nesting result for a model.

Parameters:

  • model_id (str) –

    The ID of the model.

  • nesting (Any) –

    The nesting result to store (must be COMPAS serializable).

Raises:

get_model ¤
get_model(model_id: str) -> Any

Retrieve a model by its ID.

Parameters:

  • model_id (str) –

    The ID of the model to retrieve.

Returns:

  • Any

    The model if found.

get_nesting ¤
get_nesting(model_id: str) -> Any | None

Retrieve a nesting result for a model.

Parameters:

  • model_id (str) –

    The ID of the model.

Returns:

  • Any | None

    The nesting result if found, None otherwise.

list_models ¤
list_models() -> list[str]

List all available model IDs in the database.

Returns:

  • list[str]

    A list of model IDs.

remove_model ¤
remove_model(model_id: str) -> None

Remove a model from the database.

Parameters:

  • model_id (str) –

    The ID of the model to remove.

Raises:

SessionStorage ¤

SessionStorage(session_id: str)

Functions¤

load_session ¤
load_session() -> BlueprintSession | None

Load a complete BlueprintSession object from storage.

Returns:

load_session_with_metadata ¤
load_session_with_metadata() -> dict | None

Load a complete BlueprintSession object with metadata from storage.

Returns:

  • dict | None

    A dictionary containing 'session', 'started_at', and 'ended_at', or None if not found.

remove_session ¤
remove_session() -> None

Remove a session and all its associated data from storage.

Raises:

save_session ¤
save_session(session: BlueprintSession) -> None

Save a complete BlueprintSession object to storage.

This stores the entire session including: - Session metadata (state, params, timestamps) - The main blueprint and all inner blueprints - Composite task mappings and contexts

Parameters: