SerializedDimensionRecord¶
- class lsst.daf.butler.SerializedDimensionRecord(*, definition: str, record: dict[str, typing.Union[NoneType, typing.Annotated[bool, Strict(strict=True)], typing.Annotated[int, Strict(strict=True)], typing.Annotated[float, Strict(strict=True)], typing.Annotated[str, Strict(strict=True)], lsst.daf.butler._timespan.Timespan]])¶
Bases:
BaseModelSimplified model for serializing a
DimensionRecord.Attributes Summary
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].Methods Summary
direct(*, definition, record)Construct a
SerializedDimensionRecorddirectly without validators.Attributes Documentation
- model_config: ClassVar[ConfigDict] = {'json_schema_extra': {'examples': [{'definition': 'detector', 'record': {'instrument': 'HSC', 'id': 72, 'full_name': '0_01', 'name_in_raft': '01', 'raft': '0', 'purpose': 'SCIENCE'}}]}}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
Methods Documentation
- classmethod direct(*, definition: str, record: dict[str, Any]) SerializedDimensionRecord¶
Construct a
SerializedDimensionRecorddirectly without validators.- Parameters:
- Returns:
- rec
SerializedDimensionRecord A model representing the dimension records.
- rec
Notes
This differs from the pydantic “construct” method in that the arguments are explicitly what the model requires, and it will recurse through members, constructing them from their corresponding
directmethods.This method should only be called when the inputs are trusted.