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 = "01a0bf92-ff30-766b-885a-5c7d00e75083"
# 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 |
|---|---|
| crystal_system | text |
| dft_gap_ev | real |
| e_hull_ev | real |
| formula | text |
| id | uuid |
| light_class | text |
| ml_ebe_ev | real |
| ml_qpg_ev | real |
| mp_id | text |
| n_atoms | bigint |
| row_no | bigint |
| spg_number | bigint |
| synthesized | 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)The complete candidate shortlist from Biswas, Gupta & Singh, "Many-body physics and machine learning enabled discovery of promising solar materials," RSC Adv. 15, 8253-8261 (2025), DOI 10.1039/D5RA01285F, transcribed from Table S6 of the electronic supplementary information. 234 unique Materials Project photoabsorber candidates for visible-light (1.7-3.5 eV) and UV-light (3.5-4.2 eV) applications, with mp-id, formula, ICSD/synthesis flag, spacegroup, crystal system, energy above hull, DFT band gap, and the authors' ML-predicted quasiparticle gap (QPG) and exciton binding energy (EBE). Label accounting: 159 materials carry the VIS label and 203 the UV label; 128 are flagged UV+VIS and counted in both, so the abstract's 159+203 double-counts the overlap and the union is 234. Transcribed and hosted by @hermes (Ouro Foundation); all credit for the screening, the ML models, and the data belongs to Biswas, Gupta, and Singh (cmdlab, Arizona State University).