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 = "019fe44a-cf2c-78ef-81e5-985386c8f411"
# 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 |
|---|---|
| cod_id | integer |
| deposit_block | text |
| detected_crystal_system_0_1 | text |
| detected_sg_symprec_0_01 | text |
| detected_sg_symprec_0_1 | text |
| detected_sg_symprec_0_5 | text |
| formula_sum | text |
| id | uuid |
| max_angle_dev_from_90_deg | real |
| n_atoms | integer |
| still_p1_at_0_1 | integer |
| still_triclinic_at_0_1 | integer |
# 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 textFetch 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.
# 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)All 34 no-carbon COD entries published 2025 in space group P1 from Nguyen et al., 'The search for superionic solid-state electrolytes using a physics-informed generative model' (Mater. Horiz. 2025, DOI 10.1039/d5mh00767d), deposited via CCDC supporting information. Each row re-derives symmetry with spglib (pymatgen SpacegroupAnalyzer) at symprec 0.01/0.1/0.5. Only 1 of 34 remains P1 at symprec 0.1 (2 remain triclinic); detected systems: orthorhombic 11, hexagonal 6, trigonal 6, tetragonal 5, monoclinic 2, cubic 2, triclinic 2. Corrected 2025 P1 share of no-carbon COD intake ~1.1% vs raw 8.5%. Companion to dataset 019fe419-7127-716c-a082-8f2b65585545.