asdf_pydantic.examples.shapes
=============================

.. py:module:: asdf_pydantic.examples.shapes


Classes
-------

.. autoapisummary::

   asdf_pydantic.examples.shapes.AsdfPydanticModel
   asdf_pydantic.examples.shapes.AsdfRectangle


Module Contents
---------------

.. py:class:: AsdfPydanticModel

   Bases: :py:obj:`pydantic.BaseModel`


   ASDF Serialization and Deserialization:
       Serialize to ASDF yaml tree is done with the
       py:classmethod`AsdfPydanticModel.asdf_yaml_tree()` and deserialize to an
       AsdfPydanticModel object with py:meth`AsdfPydanticModel.parse_obj()`.


   .. py:attribute:: _tag
      :type:  ClassVar[str]


   .. py:class:: Config

      .. py:attribute:: arbitrary_types_allowed
         :value: True




   .. py:method:: asdf_yaml_tree() -> dict


   .. py:method:: schema_asdf(*, metaschema: str = 'http://stsci.edu/schemas/asdf/asdf-schema-1.0.0') -> str
      :classmethod:


      Get the ASDF schema definition for this model.

      Parameters
      ----------
      metaschema, optional
          A metaschema URI, by default "http://stsci.edu/schemas/asdf/asdf-schema-1.0.0".
          See https://asdf.readthedocs.io/en/stable/asdf/extending/schemas.html#anatomy-of-a-schema
          for more options.



.. py:class:: AsdfRectangle

   Bases: :py:obj:`asdf_pydantic.AsdfPydanticModel`


   ASDF Serialization and Deserialization:
       Serialize to ASDF yaml tree is done with the
       py:classmethod`AsdfPydanticModel.asdf_yaml_tree()` and deserialize to an
       AsdfPydanticModel object with py:meth`AsdfPydanticModel.parse_obj()`.


   .. py:attribute:: _tag
      :value: 'asdf://asdf-pydantic/examples/tags/rectangle-1.0.0'



   .. py:attribute:: width
      :type:  float


   .. py:attribute:: height
      :type:  float


