Project setup python

From NVIDIA-Omniverse/ovrtx · View interactive version

Project setup python is an AI agent skill from the GitHub repository NVIDIA-Omniverse/ovrtx. Setting up a new Python project that uses ovrtx. Use when user asks to create a new Python project, set up ovrtx in Python, create a pyproject.toml, or scaffold a Python app.

How to use this skill

Skill file

Project Setup (Python)

When to Use

Use this skill when the user asks to create a new Python project, set up ovrtx in Python, create a pyproject.toml, or scaffold a Python app.

Inputs

Resolve inputs in this order: existing repository files and referenced snippets, explicit user request, then broader agent context.

Prerequisites

Instructions

  1. Identify the requested project type, platform, package source, and expected run command.
  2. Read the minimal example and setup snippets before writing scaffolding.
  3. Use the repository's existing Python or CMake conventions instead of inventing a new layout.
  4. Include renderer creation and first-frame validation only after the project dependency setup is complete.
  5. When changing code, run the narrow example setup or docs test whenever practical.

Output Format

Scripts

This skill has no scripts.

Limitations

Overview

ovrtx and ovstage are distributed as Python packages on PyPI. Use uv when you want project and dependency management. This skill scaffolds the current attached-stage workflow with both packages. ovstage remains optional for standalone compatibility code.

Project Structure

my-ovrtx-app/
  pyproject.toml
  main.py

Setup with uv (Recommended)

mkdir my-ovrtx-app && cd my-ovrtx-app
uv init
uv add ovrtx ovstage

This creates a pyproject.toml and uv.lock. Then add numpy (required for array/tensor operations):

uv add numpy

The resulting pyproject.toml will look like:

[project]
name = "my-ovrtx-app"
version = "0.1.0"
requires-python = ">=3.10,<3.14"
dependencies = [
    "ovrtx",
    "ovstage",
    "numpy",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

Adding optional dependencies

For image output:

uv add pillow

For GPU compute with Warp:

uv add warp-lang

For visualization with rerun:

uv add rerun-sdk

Setup with pip

pip install ovrtx ovstage

Minimal main.py

Source: examples/python/minimal/main.py snippet create-renderer

Source (continued): examples/python/minimal/main.py snippet add-usd

Source (continued): examples/python/minimal/main.py snippet step

Source (continued): examples/python/minimal/main.py snippet read-render-output

ovrtx and ovstage Load Order

Importing the modules does not load either OpenUSD-dependent runtime. Two flows

are supported:

shared loader, registers schema paths, and loads the ovrtx runtime/OpenUSD.

ovstage.Stage() then opens the ovstage shared loader and loads the ovstage

runtime against that initialized OpenUSD.

first ovstage.Stage. Registration opens only the ovrtx shared loader and

publishes discovery paths. Stage construction then loads the ovstage runtime

and OpenUSD; later ovrtx.Renderer() loads the ovrtx runtime with the paths

already fixed.

Treat ovstage.library_version() as ovstage initialization for ordering

purposes because its version probe creates a temporary native instance. The

schema call must precede it in a stage-first process.

Run

uv run main.py --png
# or with pip-installed ovrtx and ovstage:
python main.py --png

A successful run writes _output/render.png. The output should match the documented minimal reference image.

Key Dependencies

| Package | Purpose |

|---------|---------|

| ovrtx | Core renderer |

| ovstage | Runtime scene ownership for attached rendering |

| pillow | Image I/O (PNG, JPEG) |

| numpy | Array manipulation, DLPack interop |

| warp-lang | GPU compute kernels |

| rerun-sdk | Real-time visualization |

Troubleshooting

Standalone Compatibility (ovrtx 0.4)

The scaffold above follows the current attached-stage workflow. ovstage can be

omitted when maintaining standalone compatibility code, but the renderer-owned

scene APIs used by that mode are deprecated as scene ownership transitions

entirely to ovstage in a future release:

dependencies = [
    "ovrtx>=0.4",
    "ovstage>=0.1",
]

See docs/core/ovstage_integration.rst for the attached-mode overview.

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.