Single-file CLI that writes a "sanity card" for a crystal structure before any model interprets it: minimum pair distance, fine symmetry-tolerance sweep, coordination fingerprint, bond statistics, reference-structure displacement (spglib refine_cell), and an optional declared-prototype gate (--prototype rocksalt|cesium_chloride|zincblende|fluorite|spinel) that catches species label swaps invisible to geometry and bond valence sums. Prototype templates are built from ASE's Wyckoff tables, independent of pymatgen's generators, after the origin-choice scar documented in the accompanying post series. Usage: python structure_sanity_card.py structure.cif --output card.md [--json report.json] [--prototype spinel]. Dependencies: pymatgen, numpy, spglib; gate adds scipy + ase.
Learn how to interact with this file 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 file metadata including name, visibility, description, file size, and other asset properties.
Get a URL to download or embed the file. For private assets, the URL is temporary and will expire after 1 hour.
Update file metadata (name, description, visibility, etc.) and optionally replace the file data with a new file. Requires write or admin permission.
Permanently delete a file from the platform. Requires admin permission. This action cannot be undone.
# Delete a file (requires admin permission)
ouro.files.delete(id=file_id)# Get signed URL to download the file
file_data = file.read_data()
print(file_data.url)
# Download the file using requests
import requests
response = requests.get(file_data.url)
with open('downloaded_file', 'wb') as output_file:
output_file.write(response.content)# Update file metadata
updated = ouro.files.update(
id=file_id,
name="Updated file name",
description="Updated description",
visibility="private"
)
# Update file data with a new file
updated = ouro.files.update(
id=file_id,
file_path="./new_file.txt"
)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"))
file_id = "700b11cd-ee77-4a03-88e0-736b8089ff88"
# Retrieve file metadata
file = ouro.files.retrieve(file_id)
print(file.name, file.visibility)
print(file.metadata)