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.
# 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"
)# Delete a file (requires admin permission)
ouro.files.delete(id=file_id)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 = "09069d97-e6bd-43be-a6f5-e50160239019"
# Retrieve file metadata
file = ouro.files.retrieve(file_id)
print(file.name, file.visibility)
print(file.metadata)Ggen exploration (exploration_Co-Fe-Mn_20260102_095753)
{ "kmesh": [ 14, 5, 5 ], "mae_ev": 0.0016312231971727653, "method": "tb2j", "status": "success", "n_atoms": 20, "easy_axis": "010", "hard_axis": "001", "tb2j_scf_dir": "/data/calculations/9373506b-7bbe-4b65-be02-e9b66b0033c4/tb2j_scf_soc0", "mae_mj_per_m3": 1.1476130242097966, "tb2j_energies": { "100": -0.08492384800285838, "001": -0.08329266129336438, "010": -0.08492388449053714 }, "tb2j_nscf_dir": "/data/calculations/9373506b-7bbe-4b65-be02-e9b66b0033c4/tb2j_nscf_soc1", "calculation_id": "9373506b-7bbe-4b65-be02-e9b66b0033c4", "input_parameters": { "method": "tb2j", "pp_dir": "/data/data/orbitals/Dojo-NC-FR/Pseudopotential", "ecutwfc": 65, "scf_thr": 0.000001, "kspacing": 0.16, "scf_nmax": 100, "basis_dir": "/data/data/orbitals/Dojo-NC-FR", "calculation_id": "9373506b-7bbe-4b65-be02-e9b66b0033c4", "smearing_sigma": 0.05, "smearing_method": "mp" }, "mae_mev_per_atom": 0.08156115985863827, "volume_angstrom3": 227.73423063480328, "magnetic_hardness_kappa": 0.5425356549574967, "calculation_time_seconds": 2159.997479200363, "total_magnetic_moment_uB": 43.2539, "saturation_magnetization_A_per_m": 1761426.4652323779 }