Getting Started

Nexus Quick Start - Get up and running with Nexus

Nexus Quick Start

Authentication

The Nexus API uses Keycloak-based authentication. You can authenticate using the miura-auth CLI tool.

bash
miura-auth set-api-key --api-key "your-api-key-here"

Configuration

The Nexus API uses environment variables for configuration that can be set once and remain constant across all runs. These persistent configuration settings can be managed using the configure_env helper function.

python
import miura

# Configure environment with and settings
config_path = miura.configure_env({
    'KC_BASE_URL': 'https://dev.auth.miurasimulation.com',
    'KC_REALM': 'nexus',
    'KC_CLIENT_ID': 'nexus-hub-atlas',
})

Basic Use

Let's see how we can create projects, collections and transfer data to and from Nexus!

python
import miura
from miura.api.datasources import LocalDataSource

# Initialize the client
client = miura.Nexus()

# Create a project
project = client.create_project("my-simulation-project")

# Assume your collection is just a bunch of .vtk files
schema = [
    {
        "pattern": "**/*.vtk",
    }
]

collection = project.create_collection(
    name="simulation-results",
    schema=schema
)

# Upload data from local folder
datasource = LocalDataSource("/path/to/your/data")
collection.upload(datasource)

# Download data
client.download("my-simulation-project/simulation-results", "./downloads/")

# Clean up
client.close()

Next Steps

Now that you have the basics down, you can explore the interface and experiment with different features.

Take your time to explore the interface and don't hesitate to experiment with different features. You can always refer back to this guide for detailed documentation.

© 2025