SerializedDatasetRefContainerV1¶
- class lsst.daf.butler.SerializedDatasetRefContainerV1(*, container_version: Literal['V1'] = 'V1', universe_version: int, universe_namespace: str, dataset_types: dict[str, lsst.daf.butler._dataset_type.SerializedDatasetType], compact_refs: dict[uuid.UUID, lsst.daf.butler._dataset_ref.MinimalistSerializableDatasetRef], **extra_data: Any)¶
Bases:
SerializedDatasetRefContainer
Serializable model for a collection of DatasetRef.
Dimension records are not included.
Attributes Summary
A dictionary of computed field names and their corresponding
ComputedFieldInfo
objects.Configuration for the model, should be a dictionary conforming to [
ConfigDict
][pydantic.config.ConfigDict].Metadata about the fields defined on the model, mapping of field names to [
FieldInfo
][pydantic.fields.FieldInfo] objects.Methods Summary
from_refs
(refs)Construct a serializable form from a list of
DatasetRef
.to_refs
(universe)Construct the original
DatasetRef
.Attributes Documentation
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding
ComputedFieldInfo
objects.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [
ConfigDict
][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'compact_refs': FieldInfo(annotation=dict[UUID, MinimalistSerializableDatasetRef], required=True), 'container_version': FieldInfo(annotation=Literal['V1'], required=False, default='V1'), 'dataset_types': FieldInfo(annotation=dict[str, SerializedDatasetType], required=True), 'universe_namespace': FieldInfo(annotation=str, required=True), 'universe_version': FieldInfo(annotation=int, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [
FieldInfo
][pydantic.fields.FieldInfo] objects.This replaces
Model.__fields__
from Pydantic V1.
Methods Documentation
- classmethod from_refs(refs: Iterable[DatasetRef]) Self ¶
Construct a serializable form from a list of
DatasetRef
.- Parameters:
- refs
Iterable
[DatasetRef
] The datasets to include in the container.
- refs
- to_refs(universe: DimensionUniverse) list[lsst.daf.butler._dataset_ref.DatasetRef] ¶
Construct the original
DatasetRef
.- Parameters:
- universe
DimensionUniverse
The universe to use when constructing the
DatasetRef
.
- universe
- Returns:
- refs
list
[DatasetRef
] The
DatasetRef
that were serialized.
- refs