Skip to main content

Python authoring API for Orion-native notebook UI outputs

Project description

orion-ui

Python library for building interactive notebook UI in Orion. Author controls in a code cell with import orion_ui as ui; Orion renders them as native notebook outputs.

This package is separate from orion-notebook (the orion CLI). Install orion-ui into the same Python environment as your notebook kernel.

Install

pip install orion-ui

Orion managed runtime

If you start Orion with orion and use its managed Jupyter environment (~/.orion/runtime/venv on macOS/Linux, %USERPROFILE%\.orion\runtime\venv on Windows), orion-ui is installed automatically. You do not need a separate install.

External kernel (conda, venv, your own Jupyter)

Install into that kernel's Python:

python -m pip install orion-ui

Then restart the notebook kernel and re-run your cells.

Quick example

Put a component tree as the last expression in a code cell:

import orion_ui as ui

ui.card(
    ui.stack(
        ui.select("model", ["gpt-4.1", "claude-sonnet"], label="Model", default_value="gpt-4.1"),
        ui.slider("temperature", label="Temperature", min=0, max=2, default_value=0.7, step=0.1),
    ),
    title="Controls",
)

Read values in later cells:

model = ui.get("model")
temperature = ui.get("temperature")

Requirements

  • Python 3.8+
  • Orion (or another frontend that renders application/vnd.orion.ui+json) for interactive display

Other Jupyter frontends may show a static fallback instead of live controls.

Version coupling

Pin orion-ui to the same version as your Orion app when using managed runtimes (for example orion-ui==0.6.0). The Python output format and Orion's renderer are released together.

Links

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orion_ui-0.6.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orion_ui-0.6.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file orion_ui-0.6.1.tar.gz.

File metadata

  • Download URL: orion_ui-0.6.1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for orion_ui-0.6.1.tar.gz
Algorithm Hash digest
SHA256 e1321596d678d961ddb9b07e0a2589dcf6cc375c0c8742ca62359bc247275122
MD5 12ff03e4dcc733d9014c0e3f5ed7e986
BLAKE2b-256 d2b1fbd823dcf19100a790ed480963aa243586425dc0cced744f9c0d9423eea5

See more details on using hashes here.

File details

Details for the file orion_ui-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: orion_ui-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for orion_ui-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8466e50e9daac812913816560c9d19ce36accd96086ea5a8b912982c940da63c
MD5 3d3efa19e5691dc53b67c977f12625da
BLAKE2b-256 346bf6232caa040fcce771fe0d633bf738fd86cd4f06fcb92471f3009085aca7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page