models

module of dascore source

DASCore’s model layer: base classes and the annotated types they are built from.

Anything which inherits from DascoreBaseModel can appear in a DASCore document. Models used only to shuttle values inside one module are plain pydantic models instead.

Functions

Name Description
sensible_model_equals Custom equality to not compare private attrs and handle numpy arrays.
sensible_model_hash Hash a model on its fields, agreeing with sensible_model_equals.
values_equal Recursively compare dumped values; nulls are equal only to nulls.

Classes

Name Description
DascoreBaseModel A base model with sensible configurations.
InventoryModel Base class for immutable DASDAE inventory objects.
TimeRangedModel Base class for inventory objects with time-validity epochs.

Modules

Name Description
base Base classes for DASCore’s pydantic models.
registry The registry which lets a serialized document name the class it holds.
types Annotated types with DASCore’s validation and serialization attached.