pixano.app.routers.annotations
create_annotation(dataset_id, table, id, annotation, settings)
async
Add an annotation in a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
id
|
str
|
ID of the annotation. |
required |
annotation
|
AnnotationModel
|
Annotation to add. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
AnnotationModel
|
The annotation added. |
Source code in pixano/app/routers/annotations.py
create_annotations(dataset_id, table, annotations, settings)
async
Add annotations in a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
annotations
|
list[AnnotationModel]
|
Annotations to add. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
list[AnnotationModel]
|
List of annotations added. |
Source code in pixano/app/routers/annotations.py
delete_annotation(dataset_id, table, id, settings)
async
Delete an annotation from a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
id
|
str
|
ID of the annotation to delete. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Source code in pixano/app/routers/annotations.py
delete_annotations(dataset_id, table, ids, settings)
async
Delete annotations from a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
ids
|
Annotated[list[str], Query()]
|
IDs of the annotations to delete. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Source code in pixano/app/routers/annotations.py
get_annotation(dataset_id, table, id, settings)
async
Get an annotation from a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
id
|
str
|
ID of the annotation. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
AnnotationModel
|
The annotation. |
Source code in pixano/app/routers/annotations.py
get_annotations(dataset_id, table, settings, ids=Query(None), limit=None, skip=0, where=None, item_ids=Query(None))
async
Get annotations from a table of a dataset.
They can be filtered by IDs, item IDs, a where clause or paginated.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
ids
|
list[str] | None
|
IDs of the annotations. |
Query(None)
|
limit
|
int | None
|
Limit number of annotations. |
None
|
skip
|
int
|
Skip number of annotations. |
0
|
where
|
str | None
|
Where clause. |
None
|
item_ids
|
list[str] | None
|
Item IDs. |
Query(None)
|
Returns:
Type | Description |
---|---|
list[AnnotationModel]
|
List of annotations. |
Source code in pixano/app/routers/annotations.py
update_annotation(dataset_id, table, id, annotation, settings)
async
Update an annotation in a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
id
|
str
|
ID of the annotation. |
required |
annotation
|
AnnotationModel
|
Annotation to update. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
AnnotationModel
|
The annotation updated. |
Source code in pixano/app/routers/annotations.py
update_annotations(dataset_id, table, annotations, settings)
async
Update annotations in a table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
table
|
str
|
Table name. |
required |
annotations
|
list[AnnotationModel]
|
Annotations to update. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
list[AnnotationModel]
|
List of annotations updated. |