Source code for tdw_catalog.metadata_template.text

from typing import Optional

from tdw_catalog.utils import MetadataFieldType
import tdw_catalog.metadata_template.field as field


[docs]class Field(field.MetadataTemplateField[str]): """ Any additional text-based information you want to add to the :class:`.Dataset` Attributes ---------- None """ def __init__(self, key: str, default_value: Optional[str], optional: Optional[bool]) -> None: super().__init__(key, default_value, optional) def serialize(self) -> dict: res = super().serialize() res["default_value"] = self.default_value res["field_type"] = MetadataFieldType.FT_STRING return res