From 08596505b1fb15ef0776775bf8d1c6cf27b9de93 Mon Sep 17 00:00:00 2001 From: kmkkiii Date: Wed, 5 Nov 2025 16:49:20 +0900 Subject: [PATCH 01/11] =?UTF-8?q?Task=E3=81=AE=E3=81=BF=E3=82=92=E4=BD=9C?= =?UTF-8?q?=E6=88=90=E3=81=99=E3=82=8B(Content=E3=81=AA=E3=81=97)=E3=83=A1?= =?UTF-8?q?=E3=82=BD=E3=83=83=E3=83=89=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlabel/__init__.py | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 24b0348..9f6e7f7 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -1975,6 +1975,54 @@ def create_sequential_pcd_task( return self.api.post_request(endpoint, payload=payload) + def create_task_without_content( + self, + project: str, + name: str, + status: str | None = None, + external_status: str | None = None, + priority: Priority | None = None, + tags: list[str] = [], + **kwargs, + ) -> str: + """ + Create a single task without content. + Currently only supports robotics projects. + + project is slug of your project (Required). + name is an unique identifier of task in your project (Required). + status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back', 'approved', 'declined' (Optional). + external_status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). + priority is the priority of the task (default: none) (Optional). + Set one of the numbers corresponding to: + none = 0, + low = 10, + medium = 20, + high = 30, + tags is a list of tag to be set in advance (Optional). + assignee is slug of assigned user (Optional). + reviewer is slug of review user (Optional). + approver is slug of approve user (Optional). + external_assignee is slug of external assigned user (Optional). + external_reviewer is slug of external review user (Optional). + external_approver is slug of external approve user (Optional). + """ + endpoint = "tasks/without-content" + + payload = {"project": project, "name": name} + if status: + payload["status"] = status + if external_status: + payload["externalStatus"] = external_status + if priority is not None: + payload["priority"] = priority + if tags: + payload["tags"] = tags + + self.__fill_assign_users(payload, **kwargs) + + return self.api.post_request(endpoint, payload=payload) + def import_appendix_file( self, project: str, From b94d8d4eab11d37c057e0b94a41a12ccf6df8124 Mon Sep 17 00:00:00 2001 From: kmkkiii Date: Wed, 5 Nov 2025 16:50:31 +0900 Subject: [PATCH 02/11] =?UTF-8?q?doc:=20README=E8=BF=BD=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index a24c0a7..50f4b7b 100644 --- a/README.md +++ b/README.md @@ -2064,6 +2064,23 @@ Example of a single dicom task object } ``` +### Task without Content + +Supported following project types: + +- Robotics - Task Classification + +#### Create Tasks + +Create a new task. + +```python +task_id = client.create_task_without_content( + project="YOUR_PROJECT_SLUG", + name="TASK_NAME", +) +``` + ### Common APIs for update and delete and count are same over all tasks. From 3a5cfc07c5fe6f3cd8de93d66c2468bc20e101c5 Mon Sep 17 00:00:00 2001 From: kmkkiii Date: Wed, 5 Nov 2025 17:40:15 +0900 Subject: [PATCH 03/11] =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89?= =?UTF-8?q?=E5=90=8D=E3=81=A8endpoint=E3=82=92=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 ++++--- fastlabel/__init__.py | 7 +++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 50f4b7b..8a39f42 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ - [PCD](#pcd) - [Sequential PCD](#sequential-pcd) - [DICOM](#dicom) + - [Robotics](#robotics) - [Common](#common) - [Appendix](#appendix) - [Annotation](#annotation) @@ -2064,7 +2065,7 @@ Example of a single dicom task object } ``` -### Task without Content +### Robotics Supported following project types: @@ -2072,10 +2073,10 @@ Supported following project types: #### Create Tasks -Create a new task. +Create a new task (Content creation is required separately). ```python -task_id = client.create_task_without_content( +task_id = client.create_robotics_task( project="YOUR_PROJECT_SLUG", name="TASK_NAME", ) diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 9f6e7f7..8f99dfc 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -1975,7 +1975,7 @@ def create_sequential_pcd_task( return self.api.post_request(endpoint, payload=payload) - def create_task_without_content( + def create_robotics_task( self, project: str, name: str, @@ -1986,8 +1986,7 @@ def create_task_without_content( **kwargs, ) -> str: """ - Create a single task without content. - Currently only supports robotics projects. + Create a single robotics task without content. project is slug of your project (Required). name is an unique identifier of task in your project (Required). @@ -2007,7 +2006,7 @@ def create_task_without_content( external_reviewer is slug of external review user (Optional). external_approver is slug of external approve user (Optional). """ - endpoint = "tasks/without-content" + endpoint = "tasks/robotics" payload = {"project": project, "name": name} if status: From 5608273846bb53f062e5be87c37316187e4dc4d9 Mon Sep 17 00:00:00 2001 From: kmkkiii Date: Mon, 10 Nov 2025 10:09:53 +0900 Subject: [PATCH 04/11] =?UTF-8?q?fix:=20create=5Frobotics=5Ftask=E3=81=AE?= =?UTF-8?q?=E5=9E=8B=E3=81=A8=E5=BC=95=E6=95=B0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlabel/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 8f99dfc..97cc308 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -1979,10 +1979,10 @@ def create_robotics_task( self, project: str, name: str, - status: str | None = None, - external_status: str | None = None, - priority: Priority | None = None, - tags: list[str] = [], + status: Optional[str] = None, + external_status: Optional[str] = None, + priority: Optional[Priority] = None, + tags: Optional[list[str]] = None, **kwargs, ) -> str: """ @@ -2016,7 +2016,7 @@ def create_robotics_task( if priority is not None: payload["priority"] = priority if tags: - payload["tags"] = tags + payload["tags"] = tags or [] self.__fill_assign_users(payload, **kwargs) From 67bea155ab73e4c70fb5e176bedd102b9a6446f2 Mon Sep 17 00:00:00 2001 From: HiroshiKoba Date: Mon, 1 Dec 2025 15:48:55 +0900 Subject: [PATCH 05/11] =?UTF-8?q?=E3=82=B3=E3=83=B3=E3=83=86=E3=83=B3?= =?UTF-8?q?=E3=83=84=E3=81=AE=E3=82=A4=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastlabel/__init__.py | 26 ++++++++++++++++++++++++++ fastlabel/utils/__init__.py | 4 ++++ 2 files changed, 30 insertions(+) diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 97cc308..592e597 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -2100,6 +2100,32 @@ def get_appendix_data( return self.api.get_request(endpoint, params=params) + def import_robotics_contents_file( + self, + project: str, + file_path: str, + ) -> list: + """ + Import robotics contents file zip. + project is slug of your project (Required). + file_path is a path to data. Supported extensions are zip (Required). + """ + + if not utils.is_robotics_contents_supported_ext(file_path): + raise FastLabelInvalidException("Supported extensions are zip.", 422) + + endpoint = "contents/imports/robotics-contents/batch" + payload = {"project": project} + signed_url = self.__get_signed_path( + project=project, + file_name=os.path.basename(file_path), + file_type="application/zip", + ) + self.api.upload_zipfile(url=signed_url["url"], file_path=file_path) + payload["fileKey"] = signed_url["name"] + + return self.api.post_request(endpoint, payload=payload) + # Task Update def update_task( diff --git a/fastlabel/utils/__init__.py b/fastlabel/utils/__init__.py index 3b90d73..ae435ae 100644 --- a/fastlabel/utils/__init__.py +++ b/fastlabel/utils/__init__.py @@ -46,6 +46,10 @@ def is_appendix_supported_ext(file_path: str) -> bool: return file_path.lower().endswith((".zip")) +def is_robotics_contents_supported_ext(file_path: str) -> bool: + return file_path.lower().endswith((".zip")) + + def is_pcd_supported_ext(file_path: str) -> bool: # .ply is not yet supported. To support it, modification of the API # needs to be considered as well. From 9980636d2cf83db44434792683307d8f1cea46ba Mon Sep 17 00:00:00 2001 From: HiroshiKoba Date: Mon, 1 Dec 2025 15:49:34 +0900 Subject: [PATCH 06/11] =?UTF-8?q?README=E8=BF=BD=E8=A8=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 8a39f42..785ef11 100644 --- a/README.md +++ b/README.md @@ -2082,6 +2082,17 @@ task_id = client.create_robotics_task( ) ``` +#### Import Contents + +Import contents zip file + +```python +history = client.import_robotics_contents_file( + project="YOUR_PROJECT_SLUG", + file_path="ZIP_FILE_PATH", +) +``` + ### Common APIs for update and delete and count are same over all tasks. From f8855bf48ee838eaeb333863339489e580488ced Mon Sep 17 00:00:00 2001 From: rikunosuke Date: Wed, 3 Dec 2025 12:33:54 +0900 Subject: [PATCH 07/11] feat: Add get_task_appendix_data method to SDK MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add method to retrieve appendix data (URLs and parameters) for tasks. Returns appendix information including id, url, name, format, and calibration data. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- README.md | 25 +++++++++++++++++++++++++ fastlabel/__init__.py | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+) diff --git a/README.md b/README.md index 58ac262..9547809 100644 --- a/README.md +++ b/README.md @@ -2104,6 +2104,31 @@ client.delete_task_annotations(task_id="YOUR_TASK_ID") id_name_map = client.get_task_id_name_map(project="YOUR_PROJECT_SLUG") ``` +#### Get Task Appendix Data + +Get appendix data (URLs and parameters) for tasks. + +```python +appendix_data = client.get_task_appendix_data(project="YOUR_PROJECT_SLUG") +``` + +Filter by task name: + +```python +appendix_data = client.get_task_appendix_data( + project="YOUR_PROJECT_SLUG", + task_name="YOUR_TASK_NAME" +) +``` + +Response includes: + +- `id`: UUID of the appendix +- `url`: Image file URL +- `name`: Format is `{task_name}/{content_name}/{file_name}` +- `format`: `yml`, `kitti`, or `none` +- `calibration`: Calibration data + #### Count Task ```python diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 5a79d51..1645d70 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -2053,6 +2053,43 @@ def get_appendix_data( return self.api.get_request(endpoint, params=params) + def get_task_appendix_data( + self, + project: str, + task_name: Optional[str] = None, + offset: Optional[int] = None, + limit: int = 10000, + ) -> list: + """ + Returns a list of appendixes urls and params. + params = { + id: uuid, + url: image file url, + name: {task_name}/{content_name}/{file_name}, + format: yml or kitti or none, + calibration: calibration data, + } + + project is slug of your project (Required). + task_name is a task name (Optional). + offset is the starting position number to fetch (Optional). + limit is the max number to fetch (Optional). + """ + if limit > 10000: + raise FastLabelInvalidException( + "Limit must be less than or equal to 10000.", 422 + ) + endpoint = "tasks/appendix" + params = {"project": project} + if task_name: + params["taskName"] = task_name + if offset: + params["offset"] = offset + if limit: + params["limit"] = limit + + return self.api.get_request(endpoint, params=params) + # Task Update def update_task( From a43c001366f33507330aa43bdd9277cf62a4f8ad Mon Sep 17 00:00:00 2001 From: kmkkiii Date: Wed, 14 Jan 2026 11:24:03 +0900 Subject: [PATCH 08/11] feat: get_metadatas method --- README.md | 33 ++++++++++++++++++++++++++++++++- examples/get_metadatas.py | 8 ++++++++ fastlabel/__init__.py | 29 +++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 examples/get_metadatas.py diff --git a/README.md b/README.md index 4b28588..8110aa7 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ - [Common](#common) - [Appendix](#appendix) - [Annotation](#annotation) +- [Metadata](#metadata) - [Project](#project) - [Dataset](#dataset) - [Converter](#converter) @@ -2512,6 +2513,35 @@ Delete an annotation. client.delete_annotation(annotation_id="YOUR_ANNOTATION_ID") ``` +## Metadata + +### Get Metadatas + +Get metadatas. (Up to 1000 metadatas) + +```python +metadatas = client.get_metadatas(project="YOUR_PROJECT_SLUG") +``` + +### Response + +Example of a metadata object + +```python +{ + "id": "YOUR_METADATA_ID", + "key": "YOUR_METADATA_KEY", + "type": "text", + "options": [], + "defaultValue": "", + "order": 1, + "isAdmin": True, + "isRequired": False, + "createdAt": "2021-04-20T03:20:41.427Z", + "updatedAt": "2021-04-20T03:20:41.427Z", +} +``` + ## Project ### Create Project @@ -2622,8 +2652,9 @@ result = client.update_project_user_permission( ``` Available roles: + - `annotator`: Annotator -- `reviewer`: Reviewer +- `reviewer`: Reviewer - `owner`: Project owner - `none`: Remove user from project diff --git a/examples/get_metadatas.py b/examples/get_metadatas.py new file mode 100644 index 0000000..0e6e2dc --- /dev/null +++ b/examples/get_metadatas.py @@ -0,0 +1,8 @@ +from pprint import pprint + +import fastlabel + +client = fastlabel.Client() + +metadatas = client.get_metadatas(project="robotics-task-classification") +pprint(metadatas) diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 990aea0..a9f21d1 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -4017,6 +4017,35 @@ def delete_annotation(self, annotation_id: str) -> None: endpoint = "annotations/" + annotation_id self.api.delete_request(endpoint) + # Metadata + + def get_metadatas( + self, + project: str = None, + offset: int = None, + limit: int = 100, + ) -> list: + """ + Returns a list of metadatas. + Returns up to 1000 at a time, to get more, set offset as the starting position + to fetch. + + project is slug of your project (Required). + offset is the starting position number to fetch (Optional). + limit is the max number to fetch (Optional). + """ + if limit > 1000: + raise FastLabelInvalidException( + "Limit must be less than or equal to 1000.", 422 + ) + endpoint = "metadatas" + params = {"project": project} + if offset: + params["offset"] = offset + if limit: + params["limit"] = limit + return self.api.get_request(endpoint, params=params) + # Project def find_project(self, project_id: str) -> dict: From 7cabf419560c7300a3778e0edb3ba7e2179f74c6 Mon Sep 17 00:00:00 2001 From: kmkkiii Date: Wed, 14 Jan 2026 16:54:06 +0900 Subject: [PATCH 09/11] feat: add support for optional metadata in task creation and updates --- README.md | 84 ++++++++++++++++++++++++++++++++++------ fastlabel/__init__.py | 90 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 162 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 8110aa7..a1e8488 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ task_id = client.create_image_task( ) ``` -Create a new task with pre-defined annotations. (Class should be configured on your project in advance) +Create a new task with pre-defined annotations and metadatas. (Class and metadata should be configured on your project in advance) ```python task_id = client.create_image_task( @@ -123,7 +123,13 @@ task_id = client.create_image_task( 200, # bottom-right x 200 # bottom-right y ] - }] + }], + metadatas=[ # (optional) pre-defined metadata key-value pairs + { + "key": "metadata_key", + "value": "metadata_value" + } + ] ) ``` @@ -266,6 +272,12 @@ task_id = client.update_image_task( "startIndex": 2, "endIndex": 0 } + ], + metadatas=[ # (optional) metadata key-value pairs (metadata should be configured on your project in advance) + { + "key": "metadata_key", + "value": "metadata_value" + } ] ) ``` @@ -864,7 +876,7 @@ task_id = client.create_video_task( ) ``` -Create a new task with pre-defined annotations. (Class should be configured on your project in advance) +Create a new task with pre-defined annotations and metadatas. (Class and metadata should be configured on your project in advance) ```python task_id = client.create_video_task( @@ -906,7 +918,13 @@ task_id = client.create_video_task( "autogenerated": False } } - }] + }], + metadatas=[ # (optional) pre-defined metadata key-value pairs + { + "key": "metadata_key", + "value": "metadata_value" + } + ] ) ``` @@ -981,7 +999,13 @@ task_id = client.update_video_task( "autogenerated": False } } - }] + }], + metadatas=[ # (optional) metadata key-value pairs + { + "key": "metadata_key", + "value": "metadata_value" + } + ] ) ``` @@ -1166,7 +1190,7 @@ task_id = client.create_text_task( ) ``` -Create a new task with pre-defined annotations. (Class should be configured on your project in advance) +Create a new task with pre-defined annotations and metadatas. (Class and metadata should be configured on your project in advance) ```python task_id = client.create_text_task( @@ -1180,7 +1204,13 @@ task_id = client.create_text_task( "start": 0, "end": 10, "text": "1234567890" - }] + }], + metadatas=[ # (optional) pre-defined metadata key-value pairs + { + "key": "metadata_key", + "value": "metadata_value" + } + ] ) ``` @@ -1227,7 +1257,13 @@ task_id = client.update_text_task( "start": 0, "end": 10, "text": "0123456789" - }] + }], + metadatas=[ # (optional) metadata key-value pairs + { + "key": "metadata_key", + "value": "metadata_value" + } + ] ) ``` @@ -1354,7 +1390,7 @@ task_id = client.create_audio_task( ) ``` -Create a new task with pre-defined annotations. (Class should be configured on your project in advance) +Create a new task with pre-defined annotations and metadatas. (Class and metadata should be configured on your project in advance) ```python task_id = client.create_audio_task( @@ -1367,7 +1403,13 @@ task_id = client.create_audio_task( "value": "person", "start": 0.4, "end": 0.5 - }] + }], + metadatas=[ # (optional) pre-defined metadata key-value pairs + { + "key": "metadata_key", + "value": "metadata_value" + } + ] ) ``` @@ -1413,7 +1455,13 @@ task_id = client.update_audio_task( "value": "bird", "start": 0.4, "end": 0.5 - }] + }], + metadatas=[ # (optional) metadata key-value pairs + { + "key": "metadata_key", + "value": "metadata_value" + } + ] ) ``` @@ -1590,7 +1638,7 @@ task_id = client.create_pcd_task( ) ``` -Create a new task with pre-defined annotations. (Class should be configured on your project in advance) +Create a new task with pre-defined annotations and metadatas. (Class and metadata should be configured on your project in advance) Annotation Type: cuboid @@ -1617,6 +1665,12 @@ task_id = client.create_pcd_task( ], } ], + metadatas=[ # (optional) pre-defined metadata key-value pairs + { + "key": "metadata_key", + "value": "metadata_value" + } + ] ) ``` @@ -1692,6 +1746,12 @@ task_id = client.update_pcd_task( ], } ], + metadatas=[ # (optional) metadata key-value pairs + { + "key": "metadata_key", + "value": "metadata_value" + } + ] ) ``` diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index a9f21d1..6859111 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -955,6 +955,7 @@ def create_image_task( priority: Priority = None, annotations: list = [], tags: list = [], + metadatas: list = [], is_delete_exif: bool = False, **kwargs, ) -> str: @@ -978,6 +979,8 @@ def create_image_task( 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). annotations is a list of annotation to be set in advance (Optional). tags is a list of tag to be set in advance (Optional). + metadatas is a list of metadata key-value pairs to be set in advance (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -1008,6 +1011,8 @@ def create_image_task( payload["annotations"] = delete_extra_annotations_parameter(annotations) if tags: payload["tags"] = tags + if metadatas: + payload["metadatas"] = metadatas if is_delete_exif: payload["isDeleteExif"] = is_delete_exif if custom_task_status: @@ -1026,6 +1031,7 @@ def create_integrated_image_task( external_status: str = None, annotations: list = None, tags: list = None, + metadatas: list = [], **kwargs, ) -> str: """ @@ -1040,6 +1046,8 @@ def create_integrated_image_task( 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). annotations is a list of annotation to be set in advance (Optional). tags is a list of tag to be set in advance (Optional). + metadatas is a list of metadata key-value pairs to be set in advance (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -1068,6 +1076,8 @@ def create_integrated_image_task( payload["annotations"] = delete_extra_annotations_parameter(annotations) if tags: payload["tags"] = tags + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -1299,6 +1309,7 @@ def create_sequential_image_task( priority: Priority = None, annotations: list = [], tags: list = [], + metadatas: list = [], is_delete_exif: bool = False, **kwargs, ) -> str: @@ -1322,6 +1333,8 @@ def create_sequential_image_task( 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). annotations is a list of annotation to be set in advance (Optional). tags is a list of tag to be set in advance (Optional). + metadatas is a list of metadata key-value pairs to be set in advance (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -1375,6 +1388,8 @@ def create_sequential_image_task( payload["annotations"] = delete_extra_annotations_parameter(annotations) if tags: payload["tags"] = tags + if metadatas: + payload["metadatas"] = metadatas if is_delete_exif: payload["isDeleteExif"] = is_delete_exif @@ -1392,6 +1407,7 @@ def create_video_task( priority: Priority = None, annotations: list = [], tags: list = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -1412,6 +1428,8 @@ def create_video_task( 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). annotations is a list of annotation to be set in advance (Optional). tags is a list of tag to be set in advance (Optional). + metadatas is a list of metadata key-value pairs to be set in advance (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -1446,6 +1464,8 @@ def create_video_task( payload["annotations"] = delete_extra_annotations_parameter(annotations) if tags: payload["tags"] = tags + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -1528,6 +1548,7 @@ def create_text_task( priority: Priority = None, annotations: list = [], tags: list = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -1548,6 +1569,8 @@ def create_text_task( 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). annotations is a list of annotation to be set in advance (Optional). tags is a list of tag to be set in advance (Optional). + metadatas is a list of metadata key-value pairs to be set in advance (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -1575,6 +1598,8 @@ def create_text_task( payload["annotations"] = delete_extra_annotations_parameter(annotations) if tags: payload["tags"] = tags + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -1650,6 +1675,7 @@ def create_audio_task( priority: Priority = None, annotations: list = [], tags: list = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -1670,6 +1696,8 @@ def create_audio_task( 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). annotations is a list of annotation to be set in advance (Optional). tags is a list of tag to be set in advance (Optional). + metadatas is a list of metadata key-value pairs to be set in advance (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -1701,6 +1729,8 @@ def create_audio_task( payload["annotations"] = delete_extra_annotations_parameter(annotations) if tags: payload["tags"] = tags + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -1777,6 +1807,7 @@ def create_dicom_task( status: str = None, external_status: str = None, tags: list = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -1790,6 +1821,8 @@ def create_dicom_task( external_status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). tags is a list of tag to be set in advance (Optional). + metadatas is a list of metadata key-value pairs to be set in advance (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -1810,6 +1843,8 @@ def create_dicom_task( payload["externalStatus"] = external_status if tags: payload["tags"] = tags + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -1833,6 +1868,7 @@ def create_pcd_task( priority: Priority = None, annotations: list = [], tags: list = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -1853,6 +1889,8 @@ def create_pcd_task( 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). annotations is a list of annotation to be set in advance (Optional). tags is a list of tag to be set in advance (Optional). + metadatas is a list of metadata key-value pairs to be set in advance (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -1880,6 +1918,8 @@ def create_pcd_task( payload["annotations"] = delete_extra_annotations_parameter(annotations) if tags: payload["tags"] = tags + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -1895,6 +1935,7 @@ def create_sequential_pcd_task( priority: Priority = None, annotations: list = [], tags: list = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -1917,6 +1958,8 @@ def create_sequential_pcd_task( 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). annotations is a list of annotation to be set in advance (Optional). tags is a list of tag to be set in advance (Optional). + metadatas is a list of metadata key-value pairs to be set in advance (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -1970,6 +2013,8 @@ def create_sequential_pcd_task( payload["annotations"] = delete_extra_annotations_parameter(annotations) if tags: payload["tags"] = tags + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -2172,6 +2217,7 @@ def update_task( external_status: str = None, priority: Priority = None, tags: list = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -2189,6 +2235,8 @@ def update_task( high = 30, 'sent_back', 'approved', 'declined', 'customer_declined'. (Optional) tags is a list of tag to be set (Optional). + metadatas is a list of metadata key-value pairs to be set (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -2206,6 +2254,8 @@ def update_task( payload["priority"] = priority if tags: payload["tags"] = tags + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -2221,6 +2271,7 @@ def update_image_task( tags: list = [], annotations: List[dict] = [], relations: Optional[List[dict]] = None, + metadatas: list = [], **kwargs, ) -> str: """ @@ -2242,6 +2293,8 @@ def update_image_task( tags is a list of tag to be set (Optional). annotations is a list of annotation to be set (Optional). relations is a list of annotation relations to be set (Optional). + metadatas is a list of metadata key-value pairs to be set (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -2270,6 +2323,8 @@ def update_image_task( payload["relations"] = relations if custom_task_status: payload["customTaskStatus"] = custom_task_status + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -2383,6 +2438,7 @@ def update_sequential_image_task( priority: Priority = None, tags: list = [], annotations: List[dict] = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -2401,6 +2457,8 @@ def update_sequential_image_task( 'sent_back', 'approved', 'declined', 'customer_declined'. (Optional) tags is a list of tag to be set (Optional). annotations is a list of annotation to be set (Optional). + metadatas is a list of metadata key-value pairs to be set (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -2420,6 +2478,8 @@ def update_sequential_image_task( payload["tags"] = tags if annotations: payload["annotations"] = delete_extra_annotations_parameter(annotations) + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -2433,6 +2493,7 @@ def update_video_task( priority: Priority = None, tags: list = [], annotations: List[dict] = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -2451,6 +2512,8 @@ def update_video_task( 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). tags is a list of tag to be set (Optional). annotations is a list of annotation to be set (Optional). + metadatas is a list of metadata key-value pairs to be set (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -2472,6 +2535,8 @@ def update_video_task( for annotation in annotations: annotation["content"] = "" payload["annotations"] = delete_extra_annotations_parameter(annotations) + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -2535,6 +2600,7 @@ def update_text_task( priority: Priority = None, tags: list = [], annotations: List[dict] = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -2553,6 +2619,8 @@ def update_text_task( 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). tags is a list of tag to be set (Optional). annotations is a list of annotation to be set (Optional). + metadatas is a list of metadata key-value pairs to be set (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -2574,6 +2642,8 @@ def update_text_task( for annotation in annotations: annotation["content"] = "" payload["annotations"] = delete_extra_annotations_parameter(annotations) + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -2637,6 +2707,7 @@ def update_audio_task( priority: Priority = None, tags: list = [], annotations: List[dict] = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -2655,6 +2726,8 @@ def update_audio_task( 'sent_back', 'approved', 'declined', 'customer_declined' (Optional). tags is a list of tag to be set (Optional). annotations is a list of annotation to be set (Optional). + metadatas is a list of metadata key-value pairs to be set (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -2676,6 +2749,8 @@ def update_audio_task( for annotation in annotations: annotation["content"] = "" payload["annotations"] = delete_extra_annotations_parameter(annotations) + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -2739,6 +2814,7 @@ def update_pcd_task( priority: Priority = None, tags: list = [], annotations: List[dict] = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -2757,6 +2833,8 @@ def update_pcd_task( 'sent_back', 'approved', 'declined', 'customer_declined'. (Optional) tags is a list of tag to be set (Optional). annotations is a list of annotation to be set (Optional). + metadatas is a list of metadata key-value pairs to be set (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -2780,6 +2858,8 @@ def update_pcd_task( # the content will be filled on the server side. annotation["content"] = "" payload["annotations"] = delete_extra_annotations_parameter(annotations) + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -2793,6 +2873,7 @@ def update_sequential_pcd_task( priority: Priority = None, tags: list = [], annotations: List[dict] = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -2811,6 +2892,8 @@ def update_sequential_pcd_task( 'sent_back', 'approved', 'declined', 'customer_declined'. (Optional) tags is a list of tag to be set (Optional). annotations is a list of annotation to be set (Optional). + metadatas is a list of metadata key-value pairs to be set (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -2834,6 +2917,8 @@ def update_sequential_pcd_task( # the content will be filled on the server side. annotation["content"] = "" payload["annotations"] = delete_extra_annotations_parameter(annotations) + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) @@ -4072,6 +4157,7 @@ def update_dicom_task( status: str = None, external_status: str = None, tags: list = [], + metadatas: list = [], **kwargs, ) -> str: """ @@ -4083,6 +4169,8 @@ def update_dicom_task( external_status can be 'registered', 'completed', 'skipped', 'reviewed', 'sent_back', 'approved', 'declined', 'customer_declined'. (Optional) tags is a list of tag to be set (Optional). + metadatas is a list of metadata key-value pairs to be set (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -4098,6 +4186,8 @@ def update_dicom_task( payload["externalStatus"] = external_status if tags: payload["tags"] = tags + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) From ce3788299cb65893cb6c29bbec4f69e5d2ec065b Mon Sep 17 00:00:00 2001 From: kmkkiii Date: Fri, 16 Jan 2026 13:04:02 +0900 Subject: [PATCH 10/11] feat: add optional metadata parameter to robotics task creation --- fastlabel/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 6859111..97daed4 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -2028,6 +2028,7 @@ def create_robotics_task( external_status: Optional[str] = None, priority: Optional[Priority] = None, tags: Optional[list[str]] = None, + metadatas: Optional[list] = None, **kwargs, ) -> str: """ @@ -2044,6 +2045,8 @@ def create_robotics_task( medium = 20, high = 30, tags is a list of tag to be set in advance (Optional). + metadatas is a list of metadata key-value pairs to be set in advance (Optional). + e.g.) [{"key": "metadata_key", "value": "some_value"}] assignee is slug of assigned user (Optional). reviewer is slug of review user (Optional). approver is slug of approve user (Optional). @@ -2062,6 +2065,8 @@ def create_robotics_task( payload["priority"] = priority if tags: payload["tags"] = tags or [] + if metadatas: + payload["metadatas"] = metadatas self.__fill_assign_users(payload, **kwargs) From a947212043952a1e730ad1c34ae46fe31f4761da Mon Sep 17 00:00:00 2001 From: kmkkiii Date: Fri, 16 Jan 2026 15:25:29 +0900 Subject: [PATCH 11/11] chore: update REAMDE.md --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a1e8488..91832bc 100644 --- a/README.md +++ b/README.md @@ -152,10 +152,10 @@ task_id = client.create_integrated_image_task( ) ``` -Create a new task with pre-defined annotations. (Class should be configured on your project in advance) +Create a new task with pre-defined annotations and metadatas. (Class and metadata should be configured on your project in advance) ```python -task_id = client.create_image_task( +task_id = client.create_integrated_image_task( project="YOUR_PROJECT_SLUG", file_path="/sample.jpg", storage_type="gcp", @@ -174,7 +174,13 @@ task_id = client.create_image_task( 200, # bottom-right x 200 # bottom-right y ] - }] + }], + metadatas=[ # (optional) pre-defined metadata key-value pairs + { + "key": "metadata_key", + "value": "some_value" + } + ] ) ``` @@ -748,7 +754,13 @@ task = client.create_sequential_image_task( 100, 100 ]]] # clockwise rotation - }] + }], + metadatas=[ # (optional) pre-defined metadata key-value pairs + { + "key": "metadata_key", + "value": "some_value" + } + ] ) ``` @@ -801,6 +813,12 @@ task_id = client.update_sequential_image_task( ], "points": [990, 560, 980, 550] } + ], + metadatas=[ # (optional) metadata key-value pairs + { + "key": "metadata_key", + "value": "metadata_value" + } ] ) ``` @@ -1877,6 +1895,12 @@ task_id = client.create_sequential_pcd_task( }, }, }, + ], + metadatas=[ # (optional) pre-defined metadata key-value pairs + { + "key": "metadata_key", + "value": "some_value" + } ] ) ``` @@ -1953,6 +1977,12 @@ task_id = client.update_sequential_pcd_task( }, }, }, + ], + metadatas=[ # (optional) metadata key-value pairs + { + "key": "metadata_key", + "value": "metadata_value" + } ] ) ``` @@ -2049,7 +2079,13 @@ Once you receive the status completed, you can get the task. ```python history = client.create_dicom_task( project="YOUR_PROJECT_SLUG", - file_path="./sample.zip" + file_path="./sample.zip", + metadatas=[ # (optional) pre-defined metadata key-value pairs + { + "key": "metadata_key", + "value": "some_value" + } + ] ) ``` @@ -2088,7 +2124,13 @@ task_id = client.update_dicom_task( task_id="YOUR_TASK_ID", status="approved", assignee="USER_SLUG", - tags=["tag1", "tag2"] + tags=["tag1", "tag2"], + metadatas=[ # (optional) metadata key-value pairs + { + "key": "metadata_key", + "value": "metadata_value" + } + ] ) ``` @@ -2140,6 +2182,12 @@ Create a new task (Content creation is required separately). task_id = client.create_robotics_task( project="YOUR_PROJECT_SLUG", name="TASK_NAME", + metadatas=[ # (optional) pre-defined metadata key-value pairs + { + "key": "metadata_key", + "value": "some_value" + } + ] ) ```