sportslabkit.datasets.downloader#

Overview#

Classes#

KaggleDownloader

-

Function#

get_platform()

Get the platform of the current operating system.

confirm(msg)

Confirm the user input.

prompt(msg, type)

Prompt the user for input.

show_authenticate_message()

Show the instructions to authenticate the Kaggle API key.

authenticate(show_message)

Authenticate the Kaggle API key.

Attributes#

PathLike

-

downloader

-

Classes#

class sportslabkit.datasets.downloader.KaggleDownloader[source]#

Overview

Methods#

show_info()

Show the dataset info.

dataset_list_files()

List the files in the dataset.

download(file_name, path, force, quiet, unzip)

Download the dataset from Kaggle.

Members

show_info() None[source]#

Show the dataset info.

dataset_list_files() None[source]#

List the files in the dataset.

download(file_name: str | None = None, path: PathLike | None = _module_path, force: bool = False, quiet: bool = False, unzip: bool = True) None[source]#

Download the dataset from Kaggle.

Parameters:
  • file_name (Optional[str], optional) – Name of the file to download. If None, downloads all data. Defaults to None.

  • path (Optional[PathLike], optional) – Path to download the data to. If None, downloads to soccertrack/datasets/data. Defaults to None.

  • force (bool, optional) – If True, overwrites the existing file. Defaults to False.

  • quiet (bool, optional) – If True, suppresses the output. Defaults to True.

  • unzip (bool, optional) – If True, unzips the file. Defaults to True.

Functions#

sportslabkit.datasets.downloader.get_platform() str[source]#

Get the platform of the current operating system.

Returns:

The platform of the current operating system, one of “linux”, “mac”, “windows”, “other”.

Return type:

str

sportslabkit.datasets.downloader.confirm(msg: str) bool[source]#

Confirm the user input.

sportslabkit.datasets.downloader.prompt(msg: str, type: Any) Any[source]#

Prompt the user for input.

sportslabkit.datasets.downloader.show_authenticate_message() Any[source]#

Show the instructions to authenticate the Kaggle API key.

sportslabkit.datasets.downloader.authenticate(show_message: bool = True) Any[source]#

Authenticate the Kaggle API key.

Attributes#

sportslabkit.datasets.downloader.PathLike[source]#
sportslabkit.datasets.downloader.downloader[source]#