AttributeDef

attribute.AttributeDef(
    self,
    name,
    type,
    shape,
    default_value=None,
    comment=None,
)

The definition of a data attribute.

AttributeDef is a frozen dataclass.

AttributeDef is generic on the AttributeType which describes the type of the data (AttributeT).

Attributes

name: str

The name used to identify the attribute.

type: AttributeT

The type of the data.

shape: DataShape

The expected array shape of the data.

default_value: AttributeValue | None

An optional default value.

comment: str | None

An optional description of the attribute.