bundle.testing.tools.references.data ==================================== .. py:module:: bundle.testing.tools.references.data Attributes ---------- .. autoapisummary:: bundle.testing.tools.references.data.JSON_ENCODERS Classes ------- .. autoapisummary:: bundle.testing.tools.references.data.TestData bundle.testing.tools.references.data.NestedModel bundle.testing.tools.references.data.RecursiveModel bundle.testing.tools.references.data.TestComplexData Module Contents --------------- .. py:data:: JSON_ENCODERS .. 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:: NestedModel(/, **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:: id :type: int :value: None .. py:attribute:: info :type: str :value: None .. py:attribute:: timestamp :type: datetime.datetime :value: None .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. py:class:: RecursiveModel(/, **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:: name :type: str :value: None .. py:attribute:: children :type: None | list[RecursiveModel] :value: None .. py:attribute:: model_config Configuration for the model, should be a dictionary conforming to [`ConfigDict`][pydantic.config.ConfigDict]. .. 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()