Skip to content
SupportGo to app

Download the processed dataset

datasets.download(strdataset_id, DatasetDownloadParams**kwargs) -> DatasetDownloadResponse
GET/api/v1/datasets/{dataset_id}/download

Streams the processed rows in the requested file format. Works on datasets with status ready (full output) and also on datasets with status failed — in the failed case the stream contains only the rows that were successfully processed before the run aborted, which is useful for recovering partial output from interrupted jobs. Returns 422 only when no run has ever started on this dataset.

ParametersExpand Collapse
dataset_id: str
file_format: Optional[Literal["csv", "json", "jsonl", "parquet"]]

Output file format. Defaults to the original upload format if omitted.

One of the following:
"csv"
"json"
"jsonl"
"parquet"
ReturnsExpand Collapse

Download the processed dataset

import os
from adaption import Adaption

client = Adaption(
    api_key=os.environ.get("ADAPTION_API_KEY"),  # This is the default and can be omitted
)
response = client.datasets.download(
    dataset_id="dataset_id",
)
print(response)
"Example data"
Returns Examples
"Example data"