Overview
This page explains how to work with Datasets using the Basalt Python SDK. Datasets let you organize, retrieve, and extend structured test data (inputs, ideal outputs, metadata) to evaluate prompts, models, and full workflows.Initialization
Create a singleBasalt client and reuse it across your application or script.
Listing datasets
Retrieve all datasets accessible to your API key.Basic listing (sync)
Async listing
list in async frameworks like FastAPI.
Getting datasets
Retrieve a specific dataset with all its rows and columns.Inspecting columns
Dataset objects
The main objects you work with are:DatasetDatasetColumnDatasetRow
Dataset
slug: Unique identifier for the datasetname: Human-readable namedescription: Description of what the dataset is fornum_rows: Number of rowscolumns: List ofDatasetColumnobjectsrows: List ofDatasetRowobjects
DatasetColumn
name: Column nametype: Data type (e.g."string","number")description: Column description
DatasetRow
name: Row identifiervalues: Dict ofcolumn_name -> value. Values can be strings, numbers, orFileAttachmentobjects.ideal_output: Optional expected output for evaluationmetadata: Optional dict with additional context
FileAttachment
source: Path to the file to uploadcontent_type: MIME type of the file