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 = "01a07d46-aef0-726b-82f4-66bdec14d5a7"
# 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 |
|---|---|
| benchmark_status | text |
| cif_file_id | uuidAsset · file |
| citation | text |
| control_note | text |
| control_verdict | text |
| density_g_cm3 | numeric |
| doi | text |
| entry_id | text |
| exclusion_reason | text |
| formula | text |
| id | uuid |
| min_pair_distance_ang | numeric |
| ms_original_unit | text |
| ms_original_value | text |
| ms_tesla | real |
| ms_tesla_note | text |
| notes | text |
| num_atoms | numeric |
| phase_prototype | text |
| program | text |
| route_action_id | uuidAction |
| route_action_id_2 | uuidAction |
| route_magnetic_state | text |
| route_ms_tesla | numeric |
| route_nspin | numeric |
| route_per_site_moments_ub | text |
| route_scf_reused | boolean |
| route_settings | text |
| route_total_energy_ev | numeric |
| route_total_moment_ub | numeric |
| run_id | text |
| run_role | text |
| sample_form | text |
| sg_number | numeric |
| sg_symbol | text |
| signed_rel_error | numeric |
| structure_source | text |
| temperature_k | real |
| temperature_note | text |
| uncertainty_original | text |
| value_status | text |
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)Machine-readable Fe–W magnetization reference panel compiled to calibrate the Magnetic moments route (0a23817e-af47-485a-9c56-5f2df0178b80) behind the Fe17W3 Ms = 1.74 T observation (quest 01a07cd1). One row per (reference or run, row-role); 22 rows. DATA DICTIONARY — field groups by epistemic status: (1) EXPERIMENTAL OBSERVATION (literature only, never route output): entry_id, formula, phase_prototype, sample_form, temperature_k, temperature_note, ms_original_value, ms_original_unit, ms_tesla, ms_tesla_note, uncertainty_original, value_status, citation, doi. (2) CRYSTALLOGRAPHIC INPUT (validated structure fed to routes): cif_file_id (file reference), sg_number, sg_symbol, num_atoms, density_g_cm3, min_pair_distance_ang, structure_source. (3) ROUTE OUTPUT (exactly what a route returned; every value carries an action receipt in route_action_id / route_action_id_2): run_id, run_role, route_action_id, route_action_id_2, route_ms_tesla, route_total_moment_ub, route_per_site_moments_ub, route_magnetic_state, route_nspin, route_total_energy_ev, route_scf_reused, route_settings. (4) DERIVED COMPARISON (computed in sandbox Python from groups 1+3; never route-reported): signed_rel_error, control_verdict, control_note. (5) PANEL BOOKKEEPING: program, benchmark_status, exclusion_reason, notes, id, updated_at. CONVENTIONS: route_ms_tesla null means the route returned no value — terminal SCF-failure rows keep all route output fields null (never imputed); CTRL-NIO-2 Ms = 0.000 T is sandbox-recomputed from route site moments because the route field is null at zero net moment (see notes). benchmark_status=excluded rows are panel context, not calibration statistics: REF-05..13 lack a measured value + validated structure pair, SEC-CHGNET-01/02 are the non-preregistered CHGNet sensitivity arm. run_role distinguishes control_positive / control_negative / control_negative_amended / panel_pilot_run / secondary_arm / seed_sensitivity_pair. Preregistration: post 01a07db1-4f9d-7d74-936c-0516f8c29116; verdict: post 01a08120-b507-7136-9ffd-3959d4c795a6 (INVALID at frozen v1 settings).
| Column | Range | Mean | Filled |
|---|---|---|---|
| program | 1 distinct | — | 100% |
| entry_id | 17 distinct | — | 100% |
| formula | 11 distinct | — | 100% |
| phase_prototype | 15 distinct | — | 86% |
| sample_form | 5 distinct | — | 68% |
| temperature_k | 10–300 | 155 | 18% |
| temperature_note | 13 distinct | — | 64% |
| ms_original_value | 7 distinct | — | 36% |
| ms_original_unit | 3 distinct | — | 36% |
| ms_tesla | 0.12–2.152 | 0.9998 | 36% |
| ms_tesla_note | 11 distinct | — | 50% |
| uncertainty_original | 1 distinct | — | 9% |
| value_status | 4 distinct | — | 91% |
| citation | 15 distinct | — | 77% |
| doi | 7 distinct | — | 45% |
| notes | 22 distinct | — | 100% |