Task collection
| CLASS | DESCRIPTION |
|---|---|
FractalUploadedFile |
Model for data sent from the endpoint to the background task. |
TaskCollectCustom |
Attributes: |
TaskCollectPip |
TaskCollectPip class |
Attributes¶
Classes¶
FractalUploadedFile
pydantic-model
¶
Bases: BaseModel
Model for data sent from the endpoint to the background task.
Fields:
Source code in fractal_server/app/schemas/v2/task_collection.py
TaskCollectCustom
pydantic-model
¶
Bases: BaseModel
| ATTRIBUTE | DESCRIPTION |
|---|---|
manifest |
Manifest of a Fractal task package (this is typically the
content of
TYPE:
|
python_interpreter |
Absolute path to the Python interpreter to be used for running tasks.
TYPE:
|
name |
A name identifying this package, that will fill the
TYPE:
|
package_root |
The folder where the package is installed.
If not provided, it will be extracted via
TYPE:
|
package_name |
Name of the package, as used for
TYPE:
|
version |
Version of tasks to be collected.
TYPE:
|
Config:
extra:forbid
Fields:
-
manifest(ManifestV2) -
python_interpreter(AbsolutePathStr) -
label(NonEmptyStr) -
package_root(AbsolutePathStr | None) -
package_name(NonEmptyStr | None) -
version(NonEmptyStr)
Validators:
-
validate_package_name→package_name -
one_of_package_root_or_name
Source code in fractal_server/app/schemas/v2/task_collection.py
TaskCollectPip
pydantic-model
¶
Bases: BaseModel
TaskCollectPip class
This class only encodes the attributes required to trigger a task-collection operation. Other attributes (that are assigned during task collection) are defined as part of fractal-server.
Two cases are supported:
1. `package` is the name of a package that can be installed via `pip`.
1. `package=None`, and a wheel file is uploaded within the API request.
| ATTRIBUTE | DESCRIPTION |
|---|---|
package |
The name of a
TYPE:
|
package_version |
Version of the package
TYPE:
|
package_extras |
Package extras to include in the
TYPE:
|
python_version |
Python version to install and run the package tasks
TYPE:
|
pinned_package_versions_pre |
dictionary 'package':'version' used to pre-pin versions for specific packages.
TYPE:
|
pinned_package_versions_post |
dictionary 'package':'version' used to post-pin versions for specific packages.
TYPE:
|
Config:
extra:forbid
Fields:
-
package(NonEmptyStr | None) -
package_version(NonEmptyStr | None) -
package_extras(NonEmptyStr | None) -
python_version(Literal['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] | None) -
pinned_package_versions_pre(DictStrStr | None) -
pinned_package_versions_post(DictStrStr | None)
Validators:
-
validate_commands→package,package_version,package_extras -
validate_pinned_package_versions→pinned_package_versions_pre,pinned_package_versions_post