Skip to content

dataset

DatasetCreateV1

Bases: _DatasetBaseV1

Class for Dataset creation.

Source code in fractal_server/app/schemas/v1/dataset.py
125
126
127
128
129
130
131
132
class DatasetCreateV1(_DatasetBaseV1):
    """
    Class for `Dataset` creation.
    """

    # Validators
    _name = validator("name", allow_reuse=True)(valstr("name"))
    _type = validator("type", allow_reuse=True)(valstr("type"))

DatasetReadV1

Bases: _DatasetBaseV1

Class for Dataset read from database.

Attributes:

Name Type Description
id int
read_only bool
resource_list list[ResourceReadV1]
project_id int
project ProjectReadV1
Source code in fractal_server/app/schemas/v1/dataset.py
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
class DatasetReadV1(_DatasetBaseV1):
    """
    Class for `Dataset` read from database.

    Attributes:
        id:
        read_only:
        resource_list:
        project_id:
        project:
    """

    id: int
    resource_list: list[ResourceReadV1]
    project_id: int
    read_only: bool
    project: ProjectReadV1
    timestamp_created: datetime

    _timestamp_created = validator("timestamp_created", allow_reuse=True)(
        valutc("timestamp_created")
    )

DatasetStatusReadV1

Bases: BaseModel

Response type for the /project/{project_id}/dataset/{dataset_id}/status/ endpoint

Source code in fractal_server/app/schemas/v1/dataset.py
159
160
161
162
163
164
165
166
167
168
169
170
class DatasetStatusReadV1(BaseModel):
    """
    Response type for the
    `/project/{project_id}/dataset/{dataset_id}/status/` endpoint
    """

    status: Optional[
        dict[
            int,
            WorkflowTaskStatusTypeV1,
        ]
    ] = None

DatasetUpdateV1

Bases: _DatasetBaseV1

Class for Dataset update.

Attributes:

Name Type Description
name Optional[str]
meta Optional[dict[str, Any]]
history Optional[list[_DatasetHistoryItemV1]]
read_only Optional[bool]
Source code in fractal_server/app/schemas/v1/dataset.py
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
class DatasetUpdateV1(_DatasetBaseV1):
    """
    Class for `Dataset` update.

    Attributes:
        name:
        meta:
        history:
        read_only:
    """

    name: Optional[str]
    meta: Optional[dict[str, Any]] = None
    history: Optional[list[_DatasetHistoryItemV1]] = None
    read_only: Optional[bool]

    # Validators
    _name = validator("name", allow_reuse=True)(valstr("name"))
    _type = validator("type", allow_reuse=True)(valstr("type"))

ResourceCreateV1

Bases: _ResourceBaseV1

Class for Resource creation.

Source code in fractal_server/app/schemas/v1/dataset.py
38
39
40
41
42
43
44
class ResourceCreateV1(_ResourceBaseV1):
    """
    Class for `Resource` creation.
    """

    # Validators
    _path = validator("path", allow_reuse=True)(val_absolute_path("path"))

ResourceReadV1

Bases: _ResourceBaseV1

Class for Resource read from database.

Attributes:

Name Type Description
id int
dataset_id int
Source code in fractal_server/app/schemas/v1/dataset.py
56
57
58
59
60
61
62
63
64
65
66
class ResourceReadV1(_ResourceBaseV1):
    """
    Class for `Resource` read from database.

    Attributes:
        id:
        dataset_id:
    """

    id: int
    dataset_id: int

ResourceUpdateV1

Bases: _ResourceBaseV1

Class for Resource update.

Source code in fractal_server/app/schemas/v1/dataset.py
47
48
49
50
51
52
53
class ResourceUpdateV1(_ResourceBaseV1):
    """
    Class for `Resource` update.
    """

    # Validators
    _path = validator("path", allow_reuse=True)(val_absolute_path("path"))

_DatasetBaseV1

Bases: BaseModel

Base class for Dataset.

Attributes:

Name Type Description
name str
type Optional[str]
meta dict[str, Any]
history list[_DatasetHistoryItemV1]
read_only bool
Source code in fractal_server/app/schemas/v1/dataset.py
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
class _DatasetBaseV1(BaseModel):
    """
    Base class for `Dataset`.

    Attributes:
        name:
        type:
        meta:
        history:
        read_only:
    """

    name: str
    type: Optional[str]
    meta: dict[str, Any] = Field(default={})
    history: list[_DatasetHistoryItemV1] = Field(default=[])
    read_only: bool = False

_DatasetHistoryItemV1

Bases: BaseModel

Class for an item of Dataset.history.

Attributes:

Name Type Description
workflowtask WorkflowTaskDumpV1
status WorkflowTaskStatusTypeV1
parallelization Optional[dict]

If provided, it includes keys parallelization_level and component_list.

Source code in fractal_server/app/schemas/v1/dataset.py
69
70
71
72
73
74
75
76
77
78
79
80
81
82
class _DatasetHistoryItemV1(BaseModel):
    """
    Class for an item of `Dataset.history`.

    Attributes:
        workflowtask:
        status:
        parallelization: If provided, it includes keys `parallelization_level`
            and `component_list`.
    """

    workflowtask: WorkflowTaskDumpV1
    status: WorkflowTaskStatusTypeV1
    parallelization: Optional[dict]

_ResourceBaseV1

Bases: BaseModel

Base class for Resource.

Attributes:

Name Type Description
path str
Source code in fractal_server/app/schemas/v1/dataset.py
27
28
29
30
31
32
33
34
35
class _ResourceBaseV1(BaseModel):
    """
    Base class for `Resource`.

    Attributes:
        path:
    """

    path: str