Skip to content

Data classes

nyckel.NyckelId module-attribute

NyckelId = str

Unique 16 char alphanumerical string. For example: 9ab6nqe7dh5u2ppf

nyckel.LabelName module-attribute

LabelName = str

nyckel.ImageSampleData module-attribute

ImageSampleData = str

DataUri, Url, or local filepath.

nyckel.TextSampleData module-attribute

TextSampleData = str

nyckel.TabularSampleData module-attribute

TabularSampleData = Dict[TabularFieldKey, TabularFieldValue]

nyckel.TabularFieldKey module-attribute

TabularFieldKey = str

nyckel.TabularFieldValue module-attribute

TabularFieldValue = Union[str, float]

nyckel.ClassificationLabel dataclass

Source code in src/nyckel/functions/classification/classification.py
@dataclass
class ClassificationLabel:
    name: LabelName
    id: Optional[NyckelId] = None
    description: Optional[str] = None
    metadata: Optional[Dict[str, str]] = None

name instance-attribute

name: LabelName

id class-attribute instance-attribute

id: Optional[NyckelId] = None

description class-attribute instance-attribute

description: Optional[str] = None

metadata class-attribute instance-attribute

metadata: Optional[Dict[str, str]] = None

__init__

__init__(name: LabelName, id: Optional[NyckelId] = None, description: Optional[str] = None, metadata: Optional[Dict[str, str]] = None) -> None

nyckel.ClassificationPrediction dataclass

Source code in src/nyckel/functions/classification/classification.py
@dataclass
class ClassificationPrediction:
    label_name: LabelName
    confidence: float

label_name instance-attribute

label_name: LabelName

confidence instance-attribute

confidence: float

__init__

__init__(label_name: LabelName, confidence: float) -> None

nyckel.ClassificationAnnotation dataclass

Source code in src/nyckel/functions/classification/classification.py
@dataclass
class ClassificationAnnotation:
    label_name: str

label_name instance-attribute

label_name: str

__init__

__init__(label_name: str) -> None

nyckel.TagsAnnotation dataclass

Source code in src/nyckel/functions/tags/tags.py
@dataclass
class TagsAnnotation:
    label_name: str
    present: bool = True

label_name instance-attribute

label_name: str

present class-attribute instance-attribute

present: bool = True

__init__

__init__(label_name: str, present: bool = True) -> None

nyckel.TagsPrediction module-attribute

TagsPrediction = Sequence[ClassificationPrediction]