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 = "849c964b-ec78-4124-831f-457d0d3f32da"
# Retrieve file metadata
file = ouro.files.retrieve(file_id)
print(file.name, file.visibility)
print(file.metadata)Ggen exploration (exploration_Co-Fe-Mn_20260103_185212)
{ "kmesh": [ 15, 6, 6 ], "mae_ev": 0.00024722785760961097, "method": "tb2j", "status": "success", "n_atoms": 15, "easy_axis": "010", "hard_axis": "001", "tb2j_scf_dir": "/data/calculations/072a52ef-1b43-4477-ad67-e43c305dc7a4/tb2j_scf_soc0", "mae_mj_per_m3": 0.22787411740492922, "tb2j_energies": { "100": -0.06935826164983072, "001": -0.06922016824345482, "010": -0.06946739610106444 }, "tb2j_nscf_dir": "/data/calculations/072a52ef-1b43-4477-ad67-e43c305dc7a4/tb2j_nscf_soc1", "calculation_id": "072a52ef-1b43-4477-ad67-e43c305dc7a4", "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": "072a52ef-1b43-4477-ad67-e43c305dc7a4", "smearing_sigma": 0.05, "smearing_method": "mp" }, "mae_mev_per_atom": 0.016481857173974063, "volume_angstrom3": 173.8252247543009, "magnetic_hardness_kappa": 0.2380466235839696, "calculation_time_seconds": 2081.3130247592926, "total_magnetic_moment_uB": 33.5294, "saturation_magnetization_A_per_m": 1788877.2537607772 }