Source code for medkit.core.data_item

__all__ = ["IdentifiableDataItem", "IdentifiableDataItemWithAttrs"]

from typing import Iterable, TypeVar
from typing_extensions import Protocol, runtime_checkable


[docs]@runtime_checkable class IdentifiableDataItem(Protocol): uid: str
IdentifiableDataItemType = TypeVar( "IdentifiableDataItemType", bound=IdentifiableDataItem )
[docs]@runtime_checkable class IdentifiableDataItemWithAttrs(Protocol[IdentifiableDataItemType]): attrs: Iterable[IdentifiableDataItemType]