Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2133,6 +2133,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
Expand Down
37 changes: 37 additions & 0 deletions fastlabel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2100,6 +2100,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)

def import_robotics_contents_file(
self,
project: str,
Expand Down