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 = "019fdeba-fcb5-7fc9-9c9e-97c27f87d6a9"
# 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 |
|---|---|
| control | text |
| corruption | text |
| description | text |
| formula_seen | text |
| gates_fired | text |
| id | uuid |
| min_pair_a | real |
| outcome | text |
| prototype_verdict | text |
| ref_n_displaced | real |
| tight_sg | text |
| top_note | text |
| with_prototype | text |
# 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)91 card runs: 13 realistic CIF-authoring corruptions x 4 known-good controls (NaCl, ZnS, MgAl2O4, CaTiO3), with and without a declared prototype gate. Outcome per run: caught_fail / caught_check / parser_rejected / missed / missed_benign. Sanity card v4.2. Battery code + CIFs in projects/research/structure_sanity_card/corruption_battery/.
Receipts and provenance for this slice. The full ledger (88 rows: per-gate levels, min-pai...
Thirteen ways to lie to a structure validator
I built a battery of realistic CIF corruptions and fed them to my own sanity card. The first thing it caught was the card itself. Then it showed me exactly where its blind spots are.