pixano.app.routers.sources
create_source(dataset_id, id, source, settings)
async
Add a source in the 'source'
table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
id
|
str
|
ID of the source. |
required |
source
|
SourceModel
|
Source to add. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
SourceModel
|
The source added. |
Source code in pixano/app/routers/sources.py
create_sources(dataset_id, sources, settings)
async
Add sources in the 'source'
table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
sources
|
list[SourceModel]
|
Sources to add. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
list[SourceModel]
|
List of sources added. |
Source code in pixano/app/routers/sources.py
delete_source(dataset_id, id, settings)
async
Delete a source from the 'source'
table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
id
|
str
|
ID of the source to delete. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Source code in pixano/app/routers/sources.py
delete_sources(dataset_id, ids, settings)
async
Delete sources from the 'source'
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 sources to delete. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Source code in pixano/app/routers/sources.py
get_source(dataset_id, id, settings)
async
Get a source from the 'source'
table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
id
|
str
|
ID of the source. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
SourceModel
|
The source. |
Source code in pixano/app/routers/sources.py
get_sources(dataset_id, settings, ids=Query(None), limit=None, skip=0, where=None)
async
Get sources from the 'source'
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[SourceModel]
|
List of sources. |
Source code in pixano/app/routers/sources.py
update_source(dataset_id, id, source, settings)
async
Update a source in the 'source'
table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
id
|
str
|
ID of the source. |
required |
source
|
SourceModel
|
Source to update. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
SourceModel
|
The source updated. |
Source code in pixano/app/routers/sources.py
update_sources(dataset_id, sources, settings)
async
Update sources in the 'source'
table of a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset_id
|
str
|
Dataset ID containing the table. |
required |
sources
|
list[SourceModel]
|
Sources to update. |
required |
settings
|
Annotated[Settings, Depends(get_settings)]
|
App settings. |
required |
Returns:
Type | Description |
---|---|
list[SourceModel]
|
List of sources updated. |