Skip to content

antikythera.io ¤

Classes¤

BaseSerializerV1 ¤

Classes¤

TaskSerializer ¤
Functions¤
from_dict staticmethod ¤
from_dict(data: dict[str, Any]) -> Task

Parses a task definition dictionary into a Task object.

BlueprintJsonSerializeV1 ¤

Handles Input/Output for Blueprint JSON files (Read, Write, Validate).

Functions¤

from_file classmethod ¤
from_file(filepath: str, validate: bool = True) -> Blueprint

Loads a blueprint from a Blueprint JSON file.

Parameters:

  • filepath (str) –

    The path to the Blueprint JSON file.

  • validate (bool, default: True ) –

    Whether to validate the file against the schema, by default True.

Returns:

load_schema classmethod ¤
load_schema() -> dict[str, Any]

Load the JSON schema for Antikythera Blueprints.

validate classmethod ¤
validate(data: dict[str, Any]) -> None

Validate a blueprint dictionary against the schema.

Parameters:

  • data (dict[str, Any]) –

    The blueprint data to validation.

Raises:

  • ValidationError

    If the data does not match the schema.

validate_file classmethod ¤
validate_file(filepath: str) -> None

Validate a blueprint JSON file against the schema.

Parameters:

  • filepath (str) –

    Path to the JSON file.

Raises:

  • ValidationError

    If the data does not match the schema.

  • FileNotFoundError

    If the file does not exist.

  • JSONDecodeError

    If the file is not valid JSON.