Saltar al contenido principal

KaggleDatasetSource

DatasetSource
DashAI.back.dataset_sources.KaggleDatasetSource

Dataset source that fetches public datasets from Kaggle.

Uses the official kaggle library (module level kaggle.api). Public datasets can be searched and downloaded without authentication; a stored KaggleCredential is applied when downloading so private or consent gated datasets work too.

Methods

download_dataset(self, dataset_id: str, temp_path: str) -> str

Defined on KaggleDatasetSource

Download a Kaggle dataset's files into temp_path.

Parameters

dataset_id : str
Kaggle dataset identifier (e.g. "uciml/iris").
temp_path : str
Local directory to download into.

Returns

str
Path to the directory containing the downloaded files.

get_info(self, dataset_id: str) -> 'DatasetEntry | None'

Defined on KaggleDatasetSource

Return full metadata for a single Kaggle dataset.

Parameters

dataset_id : str
Kaggle dataset identifier in "owner/dataset-name" form.

Returns

DatasetEntry or None
Full metadata entry, or None on error.

search(self, query: str, limit: int = 20, cursor: str | None = None, **filters: Any) -> DashAI.back.dataset_sources.base_dataset_source.SearchPage

Defined on KaggleDatasetSource

Return Kaggle datasets matching a query.

Parameters

query : str
Free text search string.
limit : int, optional
Requested page size, by default 20. Passed to Kaggle, which today serves _KAGGLE_PAGE_SIZE datasets a page whatever is asked.
cursor : str or None, optional
Page number returned by the previous call as next_cursor. None fetches the first page.
**filters : Any
Supported keys: sort_by (str): Kaggle dataset sort (e.g. "hottest"). tags (list[str]): Comma-joined into Kaggle tag_ids. file_type (str): Filter by file type. license_name (str): Filter by license. user (str): Only datasets owned by this username.

Returns

SearchPage
Matching datasets and a cursor for the next page (or None).

get_credential(self, name: str)

Defined on ConfigObject

Resolve a registered credential component by name.

Parameters

name : str
Credential component class name (e.g. "HuggingFaceCredential").

Returns

BaseCredential
An instance of the requested credential component.

get_schema(cls) -> dict

Defined on ConfigObject

Generates the component related Json Schema.

Returns

dict
Dictionary representing the Json Schema of the component.

validate_and_transform(self, raw_data: dict) -> dict

Defined on ConfigObject

It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.

Parameters

raw_data : dict
A dictionary with the data provided by the user to initialize the model.

Returns

dict
A validated dictionary with the necessary objects.