pixano.app.routers.entities
create_entities(dataset_id, table, entities, settings)
async
Add entities 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 |
entities
|
list[EntityModel]
|
Entities to add. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
list[EntityModel]
|
List of entities added. |
Source code in pixano/app/routers/entities.py
create_entity(dataset_id, table, id, entity, settings)
async
Add an entity 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 entity. |
required |
entity
|
EntityModel
|
Entity to add. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
EntityModel
|
The entity added. |
Source code in pixano/app/routers/entities.py
delete_entities(dataset_id, table, ids, settings)
async
Delete entities 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 entities to delete. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Source code in pixano/app/routers/entities.py
delete_entity(dataset_id, table, id, settings)
async
Delete an entity 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 entity to delete. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Source code in pixano/app/routers/entities.py
get_entities(dataset_id, table, settings, ids=Query(None), limit=None, skip=0, where=None, item_ids=Query(None))
async
Get entities 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 views. |
Query(None)
|
limit
|
int | None
|
Limit number of views. |
None
|
skip
|
int
|
Skip number of views. |
0
|
where
|
str | None
|
Where clause. |
None
|
item_ids
|
list[str] | None
|
Item IDs. |
Query(None)
|
Returns:
Type | Description |
---|---|
list[EntityModel]
|
List of views. |
Source code in pixano/app/routers/entities.py
get_entity(dataset_id, table, id, settings)
async
Get an entity 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 entity. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
EntityModel
|
The entity. |
Source code in pixano/app/routers/entities.py
update_entities(dataset_id, table, entities, settings)
async
Update entities 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 |
entities
|
list[EntityModel]
|
Entities to update. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
list[EntityModel]
|
List of entities updated. |
Source code in pixano/app/routers/entities.py
update_entity(dataset_id, table, id, entity, settings)
async
Update an entity 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 entity. |
required |
entity
|
EntityModel
|
Entity to update. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
EntityModel
|
The entity updated. |