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.
| Column | Range | Mean | Filled |
|---|---|---|---|
| cif_file_id | 2 distinct | — | 100% |
| cif_text | 2 distinct | — | 100% |
| conventional_a_A | 2.723–2.866 | 2.795 | 100% |
| conventional_c_A | 3.712–3.712 | 3.712 | 50% |
| c_over_a | 1–1.363 | 1.182 | 100% |
| density_g_cm3 | 7.874–15.14 | 11.51 | 100% |
| fixture_id | 2 distinct | — | 100% |
| formula | 2 distinct | — | 100% |
| min_pair_distance_A | 2.482–2.674 | 2.578 | 100% |
| n_atoms | 1–2 | 1.5 | 100% |
| provenance | 2 distinct | — | 100% |
| role | 2 distinct | — | 100% |
| space_group_number | 123–229 | 176 | 100% |
| space_group_symbol | 2 distinct | — | 100% |
| validation_status | 1 distinct | — | 100% |
| volume_A3 | 11.78–27.52 | 19.65 | 100% |