Skip to content

task

TaskCreateV1

Bases: _TaskBaseV1

Class for Task creation.

Attributes:

Name Type Description
name str
command str
input_type str
output_type str
meta Optional[dict[str, Any]]
version Optional[str]
args_schema Optional[dict[str, Any]]
args_schema_version Optional[str]
docs_info Optional[str]
docs_link Optional[HttpUrl]
Source code in fractal_server/app/schemas/v1/task.py
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
class TaskCreateV1(_TaskBaseV1):
    """
    Class for `Task` creation.

    Attributes:
        name:
        command:
        input_type:
        output_type:
        meta:
        version:
        args_schema:
        args_schema_version:
        docs_info:
        docs_link:
    """

    name: str
    command: str
    input_type: str
    output_type: str
    meta: Optional[dict[str, Any]] = Field(default={})
    version: Optional[str]
    args_schema: Optional[dict[str, Any]]
    args_schema_version: Optional[str]
    docs_info: Optional[str]
    docs_link: Optional[HttpUrl]

    # Validators
    _name = validator("name", allow_reuse=True)(valstr("name"))
    _input_type = validator("input_type", allow_reuse=True)(
        valstr("input_type")
    )
    _output_type = validator("output_type", allow_reuse=True)(
        valstr("output_type")
    )
    _command = validator("command", allow_reuse=True)(valstr("command"))
    _version = validator("version", allow_reuse=True)(valstr("version"))
    _args_schema_version = validator("args_schema_version", allow_reuse=True)(
        valstr("args_schema_version")
    )

TaskExportV1

Bases: _TaskBaseV1

Class for Task export.

Source code in fractal_server/app/schemas/v1/task.py
87
88
89
90
91
92
class TaskExportV1(_TaskBaseV1):
    """
    Class for `Task` export.
    """

    pass

TaskImportV1

Bases: _TaskBaseV1

Class for Task import.

Source code in fractal_server/app/schemas/v1/task.py
79
80
81
82
83
84
class TaskImportV1(_TaskBaseV1):
    """
    Class for `Task` import.
    """

    pass

TaskReadV1

Bases: _TaskBaseV1

Class for Task read from database.

Attributes:

Name Type Description
id int
name str
command str
input_type str
output_type str
meta Optional[dict[str, Any]]
version Optional[str]
args_schema Optional[dict[str, Any]]
args_schema_version Optional[str]
docs_info Optional[str]
docs_link Optional[HttpUrl]
Source code in fractal_server/app/schemas/v1/task.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
class TaskReadV1(_TaskBaseV1):
    """
    Class for `Task` read from database.

    Attributes:
        id:
        name:
        command:
        input_type:
        output_type:
        meta:
        version:
        args_schema:
        args_schema_version:
        docs_info:
        docs_link:
    """

    id: int
    name: str
    command: str
    input_type: str
    output_type: str
    meta: Optional[dict[str, Any]] = Field(default={})
    owner: Optional[str]
    version: Optional[str]
    args_schema: Optional[dict[str, Any]]
    args_schema_version: Optional[str]
    docs_info: Optional[str]
    docs_link: Optional[HttpUrl]

TaskUpdateV1

Bases: _TaskBaseV1

Class for Task update.

Attributes:

Name Type Description
name Optional[str]
input_type Optional[str]
output_type Optional[str]
command Optional[str]
source Optional[str]
meta Optional[dict[str, Any]]
version Optional[str]
args_schema Optional[dict[str, Any]]
args_schema_version Optional[str]
docs_info Optional[str]
docs_link Optional[HttpUrl]
Source code in fractal_server/app/schemas/v1/task.py
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
class TaskUpdateV1(_TaskBaseV1):
    """
    Class for `Task` update.

    Attributes:
        name:
        input_type:
        output_type:
        command:
        source:
        meta:
        version:
        args_schema:
        args_schema_version:
        docs_info:
        docs_link:
    """

    name: Optional[str]
    input_type: Optional[str]
    output_type: Optional[str]
    command: Optional[str]
    source: Optional[str]
    meta: Optional[dict[str, Any]]
    version: Optional[str]
    args_schema: Optional[dict[str, Any]]
    args_schema_version: Optional[str]
    docs_info: Optional[str]
    docs_link: Optional[HttpUrl]

    # Validators
    _name = validator("name", allow_reuse=True)(valstr("name"))
    _input_type = validator("input_type", allow_reuse=True)(
        valstr("input_type")
    )
    _output_type = validator("output_type", allow_reuse=True)(
        valstr("output_type")
    )
    _command = validator("command", allow_reuse=True)(valstr("command"))
    _version = validator("version", allow_reuse=True)(
        valstr("version", accept_none=True)
    )

_TaskBaseV1

Bases: BaseModel

Base class for Task.

Attributes:

Name Type Description
source str

This is the information is used to match tasks across fractal installations when a workflow is imported.

Source code in fractal_server/app/schemas/v1/task.py
20
21
22
23
24
25
26
27
28
29
30
31
32
class _TaskBaseV1(BaseModel):
    """

    Base class for `Task`.

    Attributes:
        source:
            This is the information is used to match tasks across fractal
            installations when a workflow is imported.
    """

    source: str
    _source = validator("source", allow_reuse=True)(valstr("source"))