SerializableDimensionData¶
- class lsst.daf.butler.SerializableDimensionData(root: RootModelRootType = PydanticUndefined)¶
Bases:
RootModel
A pydantic model for normalized serialization of dimension records.
While dimension records are serialized directly via this model, they are deserialized by constructing a
DimensionRecordSetDeserializer
from this model, which allows full validation to be performed only on the records that are actually loaded.Attributes Summary
Configuration for the model, should be a dictionary conforming to [
ConfigDict
][pydantic.config.ConfigDict].Methods Summary
from_record_sets
(record_sets)Construct from an iterable of
DimensionRecordSet
objects.make_deserializers
(universe)Make objects from this model that handle the second phase of deserialization.
Attributes Documentation
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict
][pydantic.config.ConfigDict].
Methods Documentation
- classmethod from_record_sets(record_sets: Iterable[DimensionRecordSet]) SerializableDimensionData ¶
Construct from an iterable of
DimensionRecordSet
objects.- Parameters:
- record_sets
Iterable
[DimensionRecordSet
] Sets of dimension records, each for a different dimension element.
- record_sets
- Returns:
- model
SerializableDimensionData
New model instance.
- model
- make_deserializers(universe: DimensionUniverse) list[DimensionRecordSetDeserializer] ¶
Make objects from this model that handle the second phase of deserialization.
- Parameters:
- universe
DimensionUniverse
Definitions of all dimensions.
- universe
- Returns:
- deserializers
list
[DimensionRecordSetDeserializer
] A list of deserializers objects, one for each dimension element.
- deserializers