SerializedDataCoordinate

class lsst.daf.butler.SerializedDataCoordinate(*, dataId: dict[str, int | str | None], records: dict[str, lsst.daf.butler.dimensions._records.SerializedDimensionRecord] | None = None)

Bases: BaseModel

Simplified model for serializing a DataCoordinate.

Attributes Summary

model_computed_fields

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

Methods Summary

direct(*, dataId, records)

Construct a SerializedDataCoordinate directly without validators.

Attributes Documentation

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'dataId': FieldInfo(annotation=dict[str, Union[int, str, NoneType]], required=True), 'records': FieldInfo(annotation=Union[dict[str, SerializedDimensionRecord], NoneType], required=False, default=None)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

Methods Documentation

classmethod direct(*, dataId: dict[str, int | str | None], records: dict[str, dict] | None) SerializedDataCoordinate

Construct a SerializedDataCoordinate directly without validators.

Parameters:
dataIdSerializedDataId

The data ID.

recordsdict or None

The dimension records.

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 direct methods.

This method should only be called when the inputs are trusted.