API Reference
This page documents the main Python SDK methods and objects for working with datasets.Dataset methods
list_sync
total(int): Total number of datasets.datasets(list): List of dataset metadata objects.
slug, name, description, num_rows, and columns.
list (async)
list_sync, suitable for use in async applications.
Returns:
Same as list_sync: an object with total and datasets.
get_sync
slug(str, required): Dataset identifier.
Dataset object (see below).
add_row_sync
slug(str, required): Dataset identifier.values(dict, required): Column name → value mapping. Values can be strings, numbers, orFileAttachmentobjects for file uploads.name(str, optional): Row identifier; auto-generated if omitted.ideal_output(str, optional): Expected output for evaluation.metadata(dict, optional): Arbitrary metadata for this row.
DatasetRow object representing the newly created row.
add_row (async)
add_row_sync, for use in async workflows.
Returns:
Same as add_row_sync: a DatasetRow object.
Dataset objects
Dataset
Represents a complete dataset, including schema and rows.
slug(str): Unique identifier.name(str): Human-readable name.description(str): Description of the dataset.num_rows(int): Number of rows.columns(list[DatasetColumn]): List of column definitions.rows(list[DatasetRow]): List of rows in the dataset.
DatasetColumn
Describes a single column in the dataset schema.
name(str): Column name.type(str): Data type (for example"string","number").description(str): Column description.
DatasetRow
Represents a single test case / row.
name(str): Row identifier.values(dict): Column name → value mapping.ideal_output(str | None): Expected output, when available.metadata(dict | None): Additional metadata for this row.
FileAttachment
Used to upload files as part of a dataset row.
source(Path | str): Path to the file to upload.content_type(str): MIME type of the file (e.g.,"image/png","application/pdf").