Source code for tdw_catalog.metadata.license_expiry
from datetime import date
from typing import Optional
import tdw_catalog.metadata.field as field
import tdw_catalog.metadata.date_field as date_field
[docs]class Field(field.RecommendedMetadataField[date], date_field.Field):
"""
Monitor data license term limits
Attributes
----------
None
"""
def __init__(self, key: str, value: Optional[date]) -> None:
super().__init__(key, value)
def serialize(self) -> dict:
res = super().serialize()
res["recommended_type"] = "expiryDate"
return res