From f8855bf48ee838eaeb333863339489e580488ced Mon Sep 17 00:00:00 2001 From: rikunosuke Date: Wed, 3 Dec 2025 12:33:54 +0900 Subject: [PATCH] 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(