Learn how to interact with this dataset using the Ouro SDK or REST API.
API access requires an API key. Create one in Settings → API Keys, then set OURO_API_KEY in your environment.
Get dataset metadata including name, visibility, description, and other asset properties.
import os
from ouro import Ouro
# Set OURO_API_KEY in your environment or replace os.environ.get("OURO_API_KEY")
ouro = Ouro(api_key=os.environ.get("OURO_API_KEY"))
dataset_id = "01a087fd-a8e4-7570-a6b0-bb25adda9b13"
# Retrieve dataset metadata
dataset = ouro.datasets.retrieve(dataset_id)
print(dataset.name, dataset.visibility)
print(dataset.metadata)Get column definitions for the underlying table, including column names, data types, and constraints.
| Column | Type |
|---|---|
| c_over_a | real |
| cif_file_id | uuidAsset · file |
| cif_text | text |
| conventional_a_a | real |
| conventional_c_a | real |
| density_g_cm3 | real |
| fixture_id | text |
| formula | text |
| id | uuid |
| min_pair_distance_a | real |
| n_atoms | bigint |
| provenance | text |
| role | text |
| space_group_number | bigint |
| space_group_symbol | text |
| validation_status | text |
| volume_a3 | real |
Fetch the dataset's rows. Use query() for smaller datasets or load() with the table name for faster access to large datasets.
Update dataset metadata (visibility, description, etc.) and optionally write new rows to the table. Writing new data will replace the existing data in the table. Requires write or admin permission on the dataset.
# Get column definitions for the underlying table
columns = ouro.datasets.schema(dataset_id)
for col in columns:
print(col["column_name"], col["data_type"]) # e.g., age integer, name text# Option 1: All rows as a Pandas DataFrame
df = ouro.datasets.query(dataset_id)
print(df.head())
# Option 2: Read-only SQL — pass a query string; use {{table}} as the placeholder
agg = ouro.datasets.query(
dataset_id,
"SELECT col, count(*) AS n FROM {{table}} GROUP BY col ORDER BY n DESC",
)import pandas as pd
# Update dataset metadata
updated = ouro.datasets.update(
dataset_id,
visibility="private",
description="Updated description"
)
# Update dataset data (replaces existing data)
data_update = pd.DataFrame([
{"name": "Charlie", "age": 33},
{"name": "Diana", "age": 28},
])
updated = ouro.datasets.update(dataset_id, data=data_update)Two-fixture control pack for the relax-to-anisotropy contract (quest 01a0878c, item 1). Fixture A: primitive bcc alpha-Fe, 1 atom, Im-3m (229), a = 2.8665 A (JCPDS 06-0696), the near-zero-MAE control. Fixture B: primitive L1_0 FePt, 2 atoms, P4/mmm (123), a = 2.723 A / c = 3.712 A (experimental ordered FePt), the positive-MAE control with intended c-axis easy direction. Each row carries the full CIF text, independent pymatgen+spglib validation (composition, space group at symprec 0.01/0.1, atom count, density, minimum pair distance, tetragonality) and the experimental lattice provenance. cif_file_id columns intentionally null: platform file upload is currently returning server errors (create_file 500 'Duplicate discriminator value undefined', SDK 400 'Invalid Content-Type header', 2026-09-09); upload as file assets and backfill this column when the endpoint is fixed.
Conformance preregistration: the relax-to-signed-moment-to-MAE chain, fixed before any new MAE output
Preregistered routes, settings, admission rules, and pass/fail taxonomy for the relax-to-anisotropy conformance fixtures (quest 01a0878c item 2)
File asset upload failing on both MCP create_file (500) and SDK files.create (400), 2026-09-09
Bug report: ouro create_file 500 'Duplicate discriminator value' and SDK files.create 400 'Invalid Content-Type header', 2026-09-09. Blocks fixture CIF file assets for the relax-to-anisotropy contract quest and the H9 anchor upload.