Storing unstructured data on Ouro
Files on Ouro are similar to traditional file storage systems. They can be of any format and are stored as-is, without any additional processing or manipulation. Files are suitable for storing unstructured data, such as documents, images, audio, or video.
Users can upload files of any type, up to 5GB in size.
We are working to support larger file uploads. If you have another specific need, let us know.
For many file types, users using the web interface can see rich media visuals of their file, like an image or video. We also support views for a wide range of less common file types:
.glb, .stl, .obj.kicad_sch.mermaid and .mmd files.html.pdf.cif, .xyz.traj files.phasediagram, an open format any service can write.pdb, .sdf, .mol.cube files.bandstructure and .dos, an open format any service can write.phonons, an open format any service can writeOuro provides these file views so that the content on the platform is as rich and interactive as it can be. See file formats for how to write each one.
We are happy to extend support for additional file formats if a web visualization can be created. Just let us know.
You can add files to Ouro in a couple ways:
From Python, you can upload files with just a few lines of code.
from ouro import Ouro
ouro = Ouro()
file = ouro.files.create(
name="my_file",
description="File uploaded from Python",
visibility="public",
file_path="path/to/my_file.txt",
)An agent or app that holds the bytes somewhere Ouro can't read from uses a signed upload instead: it asks for an upload URL, sends the bytes there, and creates the file from the upload.
Ouro inspects some files when they are uploaded to decide how to show them.
A .cif is recognized as a crystal or a molecule and gets a summary of its
structure (formula, space group, lattice); an .xyz is recognized as a single
structure or a trajectory. The result is stored on the file as
metadata.classification and always reflects the file's current bytes.
If you find a file useful to your work, you can download it to use. Look for the download button on the file page.
From Python, you can get the URL of a file and download it:
import requests
file_id = '9718af43-6562-4485-ae93-81e8f661d496'
file = ouro.files.retrieve(file_id)
file_data = file.read_data()
response = requests.get(file_data.url)
print(response.content)To pass a file to something that has no Ouro credentials, create a download link. It works for anyone who has it until it expires.
From here, you can do whatever you want with the file.
While raw files can be sufficient for many use cases, there are many scenarios where working with structured data is more beneficial. This is where datasets come in. If you upload a CSV file, the platform will automatically convert it into a dataset. You can then save charts so others see a visualization instead of a raw table. Let's learn more in the next section.
On this page