Export to Lab format
Code Reference
See the code reference for further details.
Compatibility
Export to Lab is available for all the projects.
Output
JSON file
Info
You can also set the in_memory
parameter to True
to make the export_tasks()
function return the result as Iterable[Dict]
Usage
from isahitlab.client import IsahitLab
lab = IsahitLab()
lab.export_tasks(project_id="<project_id>", format="lab")
You can filter the tasks with the same parameters than you can use to get tasks.
from isahitlab.client import IsahitLab
lab = IsahitLab()
lab.export_tasks(project_id="<project_id>",
format="lab",
batch_id_in=["<batch_id>"],
status_in=["complete", "reviewed"],
updated_at_gte="2024-12-25 00:00:00"
)
Use output_folder
and / or output_filename
to choose where to save the results.
from isahitlab.client import IsahitLab
lab = IsahitLab()
lab.export_tasks(project_id="<project_id>",
format="lab",
output_folder="./output",
output_filename="my-export.json"
)
Output name
If you set the output_filename
parameter, it must end with .json
Directory tree
The SDK will automatically create the folder tree if you set an output_folder
like output/my_outputs/<project_id>