bundle.testing.tools.references =============================== .. py:module:: bundle.testing.tools.references Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/bundle/testing/tools/references/data/index /autoapi/bundle/testing/tools/references/entity/index Classes ------- .. autoapisummary:: bundle.testing.tools.references.TestComplexData bundle.testing.tools.references.TestData bundle.testing.tools.references.TestComplexEntity bundle.testing.tools.references.TestComplexEntityMultipleInheritance bundle.testing.tools.references.TestEntity Package Contents ---------------- .. py:class:: TestComplexData(/, **data: Any) Bases: :py:obj:`bundle.core.data.Data` Base data model class, providing utilities for serialization and deserialization from/to JSON, along with JSON Schema generation. .. attribute:: model_config Default model configuration settings. .. py:attribute:: string_field :type: str :value: None .. py:attribute:: int_field :type: int :value: None .. py:attribute:: float_field :type: float :value: None .. py:attribute:: bool_field :type: bool :value: None .. py:attribute:: optional_field :type: None | str :value: None .. py:attribute:: list_field :type: list[int] :value: None .. py:attribute:: set_field :type: set[str] :value: None .. py:attribute:: dict_field :type: dict[str, int] :value: None .. py:attribute:: union_field :type: int | str :value: None .. py:attribute:: nested_model :type: NestedModel :value: None .. py:attribute:: nested_model_list :type: list[NestedModel] :value: None .. py:attribute:: optional_nested_model :type: None | NestedModel :value: None .. py:attribute:: recursive_model :type: RecursiveModel :value: None .. py:attribute:: dynamic_default_field :type: str :value: None .. py:attribute:: file_path :type: pathlib.Path :value: None .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. py:method:: check_positive(value) .. py:method:: check_dynamic_default_based_on_int_field() .. py:class:: TestData(/, **data: Any) Bases: :py:obj:`bundle.core.data.Data` Base data model class, providing utilities for serialization and deserialization from/to JSON, along with JSON Schema generation. .. attribute:: model_config Default model configuration settings. .. py:class:: TestComplexEntity(/, **data: Any) Bases: :py:obj:`TestEntity` An extension of the `Data` model that represents an entity with enhanced introspection and optional persistence capabilities. It tracks the entity's creation time and can automatically save its state upon destruction if configured to do so. .. attribute:: name The name of the entity, with a default value of "Default". :type: str .. attribute:: born_time The timestamp of entity instantiation, in nanoseconds. :type: int Properties: class_name (str): The name of the entity's class. age (int): The age of the entity in nanoseconds, calculated from its `born_time`. .. py:attribute:: string_field :type: str :value: None .. py:attribute:: int_field :type: int :value: None .. py:attribute:: float_field :type: float :value: None .. py:attribute:: bool_field :type: bool :value: None .. py:attribute:: optional_field :type: None | str :value: None .. py:attribute:: list_field :type: list[int] :value: None .. py:attribute:: set_field :type: set[str] :value: None .. py:attribute:: dict_field :type: dict[str, int] :value: None .. py:attribute:: dict_complex_field :type: dict[str, pathlib.Path] :value: None .. py:attribute:: union_field :type: int | str :value: None .. py:attribute:: nested_model :type: NestedModel :value: None .. py:attribute:: nested_model_list :type: list[NestedModel] :value: None .. py:attribute:: optional_nested_model :type: None | NestedModel :value: None .. py:attribute:: recursive_model :type: RecursiveModel :value: None .. py:attribute:: dynamic_default_field :type: str :value: None .. py:attribute:: file_path :type: pathlib.Path :value: None .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. py:method:: check_positive(value) .. py:method:: check_dynamic_default_based_on_int_field() .. py:class:: TestComplexEntityMultipleInheritance(/, **data: Any) Bases: :py:obj:`RecursiveModel`, :py:obj:`bundle.testing.tools.references.data.TestComplexData` An extension of the `Data` model that represents an entity with enhanced introspection and optional persistence capabilities. It tracks the entity's creation time and can automatically save its state upon destruction if configured to do so. .. attribute:: name The name of the entity, with a default value of "Default". :type: str .. attribute:: born_time The timestamp of entity instantiation, in nanoseconds. :type: int Properties: class_name (str): The name of the entity's class. age (int): The age of the entity in nanoseconds, calculated from its `born_time`. .. py:attribute:: born_time :type: int :value: None .. py:class:: TestEntity(/, **data: Any) Bases: :py:obj:`bundle.core.Entity` An extension of the `Data` model that represents an entity with enhanced introspection and optional persistence capabilities. It tracks the entity's creation time and can automatically save its state upon destruction if configured to do so. .. attribute:: name The name of the entity, with a default value of "Default". :type: str .. attribute:: born_time The timestamp of entity instantiation, in nanoseconds. :type: int Properties: class_name (str): The name of the entity's class. age (int): The age of the entity in nanoseconds, calculated from its `born_time`. .. py:attribute:: born_time :type: int :value: None .. py:attribute:: identifier :type: bundle.core.entity.Identifier :value: None .. py:attribute:: version :type: str :value: None