pixano.app.routers.items
create_item(dataset_id, id, item, settings)
async
Add an item in the 'item'
table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
id
|
str
|
ID of the item. |
required |
item
|
ItemModel
|
Item to add. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
ItemModel
|
The item added. |
Source code in pixano/app/routers/items.py
create_items(dataset_id, items, settings)
async
Add items in the 'item'
table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
items
|
list[ItemModel]
|
Items to add. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
list[ItemModel]
|
List of items added. |
Source code in pixano/app/routers/items.py
delete_item(dataset_id, id, settings)
async
Delete an item from the 'item'
table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
id
|
str
|
ID of the item to delete. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Source code in pixano/app/routers/items.py
delete_items(dataset_id, ids, settings)
async
Delete items from the 'item'
table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
ids
|
Annotated[list[str], Query()]
|
IDs of the items to delete. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Source code in pixano/app/routers/items.py
get_item(dataset_id, id, settings)
async
Get an item from the 'item'
table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
id
|
str
|
ID of the item. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
ItemModel
|
The item. |
Source code in pixano/app/routers/items.py
get_items(dataset_id, settings, ids=Query(None), limit=None, skip=0, where=None)
async
Get sources from the 'item'
table of a dataset.
They can be filtered by IDs, a where clause or paginated.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
ids
|
list[str] | None
|
IDs of the sources. |
Query(None)
|
limit
|
int | None
|
Limit number of sources. |
None
|
skip
|
int
|
Skip number of sources. |
0
|
where
|
str | None
|
Where clause. |
None
|
Returns:
Type | Description |
---|---|
list[ItemModel]
|
List of sources. |
Source code in pixano/app/routers/items.py
update_item(dataset_id, id, item, settings)
async
Update an item in the 'item'
table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
id
|
str
|
ID of the item. |
required |
item
|
ItemModel
|
Item to update. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
ItemModel
|
The item updated. |
Source code in pixano/app/routers/items.py
update_items(dataset_id, items, settings)
async
Update items in the 'item'
table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
items
|
list[ItemModel]
|
Items to update. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
list[ItemModel]
|
List of items updated. |