SerializedDatasetType

class lsst.daf.butler.SerializedDatasetType(*, name: str, storageClass: str | None = None, dimensions: list[typing.Annotated[str, Strict(strict=True)]] | None = None, parentStorageClass: str | None = None, isCalibration: bool = False)

Bases: BaseModel

Simplified model of a DatasetType suitable for serialization.

Attributes Summary

model_config

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

Methods Summary

direct(*, name[, storageClass, dimensions, ...])

Construct a SerializedDatasetType directly without validators.

Attributes Documentation

model_config: ClassVar[ConfigDict] = {}

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

Methods Documentation

classmethod direct(*, name: str, storageClass: str | None = None, dimensions: list | None = None, parentStorageClass: str | None = None, isCalibration: bool = False) SerializedDatasetType

Construct a SerializedDatasetType directly without validators.

This differs from Pydantic’s model_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.

Parameters:
namestr

The name of the dataset type.

storageClassstr or None

The name of the storage class.

dimensionslist or None

The dimensions associated with this dataset type.

parentStorageClassstr or None

The parent storage class name if this is a component.

isCalibrationbool

Whether this dataset type represents calibrations.

Returns:
SerializedDatasetType

A Pydantic model representing a dataset type.