Source code for medkit.core.data_item
__all__ = ["IdentifiableDataItem", "IdentifiableDataItemWithAttrs"]
from typing import Iterable, TypeVar, runtime_checkable
from typing_extensions import Protocol
[docs]
@runtime_checkable
class IdentifiableDataItem(Protocol):
uid: str
IdentifiableDataItemType = TypeVar("IdentifiableDataItemType", bound=IdentifiableDataItem)
[docs]
@runtime_checkable
class IdentifiableDataItemWithAttrs(Protocol[IdentifiableDataItemType]):
attrs: Iterable[IdentifiableDataItemType]