pixano.app.models.datasets
DatasetBrowser(**data)
Bases: BaseModel
Data for Dataset Browser page.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
dataset id |
name |
str
|
dataset name |
table_data |
TableData
|
table data |
pagination |
PaginationInfo
|
pagination infos |
semantic_search |
list[str]
|
list of semantic search available models |
Source code in pydantic/main.py
DatasetModel(**data)
Bases: BaseModel
The model of a dataset.
Attributes:
Name | Type | Description |
---|---|---|
id |
str
|
Dataset ID. |
path |
Path
|
Path to the dataset. |
previews_path |
Path
|
Path to the previews. |
media_dir |
Path
|
Path to the media directory. |
thumbnail |
Path
|
Path to the thumbnail. |
dataset_schema |
DatasetSchema
|
The dataset schema. |
feature_values |
DatasetFeaturesValues
|
The feature values of the dataset. |
info |
DatasetInfoModel
|
The dataset info. |
Source code in pydantic/main.py
from_dataset(dataset)
classmethod
Create a dataset model from a dataset.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataset
|
Dataset
|
The dataset. |
required |
Returns:
Type | Description |
---|---|
Self
|
The dataset model. |
Source code in pixano/app/models/datasets.py
from_json(data)
classmethod
Create a dataset model from a JSON object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
dict[str, Any]
|
JSON object. |
required |
Returns:
Type | Description |
---|---|
Self
|
Dataset model. |
Source code in pixano/app/models/datasets.py
PaginationColumn(**data)
Bases: BaseModel
Column description.
Attributes:
Name | Type | Description |
---|---|---|
name |
str
|
column name. |
type |
str
|
column type. |
Source code in pydantic/main.py
PaginationInfo(**data)
Bases: BaseModel
Pagination info.
Attributes:
Name | Type | Description |
---|---|---|
current_page |
int
|
current page. |
page_size |
int
|
number of items per page. |
total_size |
int
|
total number of items. |
Source code in pydantic/main.py
TableData(**data)
Bases: BaseModel
Table data.
Attributes:
Name | Type | Description |
---|---|---|
columns |
list[PaginationColumn]
|
column descriptions. |
rows |
list[dict[str, Any]]
|
rows (actual data). |