From 08596505b1fb15ef0776775bf8d1c6cf27b9de93 Mon Sep 17 00:00:00 2001 From: kmkkiii Date: Wed, 5 Nov 2025 16:49:20 +0900 Subject: [PATCH 1/7] =?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 2/7] =?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 3/7] =?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 4/7] =?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 5/7] =?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 6/7] =?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 7/7] 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(