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 = "01a09702-7919-7a70-809a-960806fafc3c"
# 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 |
|---|---|
| baseline_row_ref | text |
| c_over_a | real |
| candidates_row_ref | text |
| cif_file_id | text |
| composition_distance_l1 | real |
| composition_distance_note | text |
| e_hull_ev_atom | real |
| formula | text |
| id | uuid |
| magnetic_gate_summary | text |
| map_role | text |
| nearest_reported_mn_bi_phase | text |
| nearest_reported_prototype | text |
| notes | text |
| plausibility_evidence | text |
| prototype_match_evidence | text |
| source_action_ids | text |
| space_group | bigint |
| stability_evidence | text |
| structure_label | text |
| synthesis_plausibility | text |
| synthesis_window | text |
| vol_per_atom_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)Machine-readable Mn-Bi phase and prototype-neighborhood map for H12 (quest 01a095ec item order 10). Joins the cited Mn-Bi literature baseline (dataset 01a096ca-d30b-708b-b45f-886a26397e3a) to every checked H12 structure: the D019 Mn3Bi anchor (the only checked structure) plus the program control LTP MnBi, and records the five out-of-window GGen near-hull phases as unevaluated context. Measures: prototype match = space group + reduced stoichiometry + Wyckoff-set identity to a named prototype; composition distance = L1 norm on elemental fractions to the nearest reported Mn-Bi phase; lattice descriptors (c/a, volume per atom, minimum pair distances) computed with pymatgen from the CIFs at symprec 0.1. cif_file_id holds file asset ids (promoted to a reference column after ingest). Synthesis-plausibility labels carry their evidence; readers are invited to challenge the prototype and synthesis labels.