Exports#
- SAClient.prepare_export(project, folder_names=None, annotation_statuses=None, include_fuse=False, only_pinned=False, **kwargs)#
Prepare annotations and classes.json for export. Original and fused images for images with annotations can be included with include_fuse flag.
- Parameters:
project (str) – project name
folder_names (list of str) – names of folders to include in the export. If None, whole project will be exported
annotation_statuses (list of strs) – images with which status to include, if None, [“NotStarted”, “InProgress”, “QualityCheck”, “Returned”, “Completed”, “Skipped”] will be chosen list elements should be one of NotStarted InProgress QualityCheck Returned Completed Skipped
include_fuse (bool) – enables fuse images in the export
only_pinned (bool) – enable only pinned output in export. This option disables all other types of output.
kwargs –
Arbitrary keyword arguments:
integration_name: The name of the integration within the platform that is being used.
format: The format in which the data will be exported in multimodal projects. It can be either CSV or JSON. If None, the data will be exported in the default JSON format.
- Returns:
metadata object of the prepared export
- Return type:
dict
Request Example:
client = SAClient() export = client.prepare_export( project = "Project Name", folder_names = ["Folder 1", "Folder 2"], annotation_statuses = ["Completed","QualityCheck"], format = "CSV" ) client.download_export("Project Name", export, "path_to_download")
- SAClient.download_export(project, export, folder_path, extract_zip_contents=True, to_s3_bucket=None)#
Download prepared export.
- Parameters:
project (str) – project name
export (str or dict) – export name
folder_path (Path-like (str or Path)) – where to download the export
extract_zip_contents (bool) – if False then a zip file will be downloaded, if True the zip file will be extracted at folder_path
to_s3_bucket (Bucket object) – AWS S3 bucket to use for download. If None then folder_path is in local filesystem.
- SAClient.get_exports(project, return_metadata=False)#
Get all prepared exports of the project.
- Parameters:
project (str) – project name
return_metadata (bool) – return metadata of images instead of names
- Returns:
names or metadata objects of the all prepared exports of the project
- Return type:
list of strs or dicts