sift_py.file_attachment.entity

Entities represent things that files can be attached to.

 1"""
 2Entities represent things that files can be attached to.
 3"""
 4
 5from __future__ import annotations
 6
 7from enum import Enum
 8
 9
10class Entity:
11    """
12    An abstract entity that represents the thing that we want to attach files to.
13    """
14
15    entity_id: str
16    entity_type: EntityType
17
18    def __init__(self, entity_id: str, entity_type: EntityType):
19        self.entity_id = entity_id
20        self.entity_type = entity_type
21
22
23class EntityType(Enum):
24    """
25    Represents the types of entities that supports file attachments.
26    """
27
28    RUN = "runs"
29    ANNOTATION = "annotations"
30    ANNOTATION_LOG = "annotation_logs"
class Entity:
11class Entity:
12    """
13    An abstract entity that represents the thing that we want to attach files to.
14    """
15
16    entity_id: str
17    entity_type: EntityType
18
19    def __init__(self, entity_id: str, entity_type: EntityType):
20        self.entity_id = entity_id
21        self.entity_type = entity_type

An abstract entity that represents the thing that we want to attach files to.

Entity( entity_id: str, entity_type: EntityType)
19    def __init__(self, entity_id: str, entity_type: EntityType):
20        self.entity_id = entity_id
21        self.entity_type = entity_type
entity_id: str
entity_type: EntityType
class EntityType(enum.Enum):
24class EntityType(Enum):
25    """
26    Represents the types of entities that supports file attachments.
27    """
28
29    RUN = "runs"
30    ANNOTATION = "annotations"
31    ANNOTATION_LOG = "annotation_logs"

Represents the types of entities that supports file attachments.

RUN = <EntityType.RUN: 'runs'>
ANNOTATION = <EntityType.ANNOTATION: 'annotations'>
ANNOTATION_LOG = <EntityType.ANNOTATION_LOG: 'annotation_logs'>
Inherited Members
enum.Enum
name
value