Creating a dataset

create_dataset(self)
Create a new internal dataset.
Returns: dict: A dictionary containing the dataset ID.

Listing all datasets

list_datasets(self)
List all datasets.
Returns: list: A list of dataset IDs.

Listing all files in a dataset

list_dataset_files(self, dataset_id: str)
List all files in a dataset.
Parameters:
  • dataset_id (str): The ID of the dataset to list the files in.
Returns: list: A list of file names in the dataset.

Uploading files to a dataset

upload_to_dataset(self, dataset_id: List[str] | str = None, file_paths: List[str] | str = None)
Upload files to a dataset.
This method uploads files to a dataset. Accepts a dataset ID and file paths. If only a single parameter is provided, it will be interpreted as the file paths.
Parameters:
  • dataset_id (Union[List[str], str], optional): The ID of the dataset to upload the files to. If not provided, the files will be uploaded to a new dataset.
  • file_paths (Union[List[str], str], optional): A list of file paths to upload.
Returns: list: A list of file names in the dataset.

Downloading files from a dataset

download_from_dataset(self, dataset_id: str, files: List[str] | str = None, output_path: str = None)
Download a file from a dataset.
This method downloads files from a dataset. Accepts a dataset ID and file name. If no file name is provided, all files in the dataset will be downloaded.
Parameters:
  • dataset_id (str): The ID of the dataset to download the file from.
  • files (Union[List[str], str], optional): The name(s) of the file(s) to download. If not provided, all files in the dataset will be downloaded.
  • output_path (str, optional): The directory to save the downloaded files to. If not provided, the files will be saved to the current working directory.
Returns: None