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",
class_name="controls-card",
)
Read values in later cells:
model = ui.get("model")
temperature = ui.get("temperature")
class_name adds semantic CSS hooks for Orion App View. Define the matching CSS in notebook metadata at metadata.orion.appView.css; do not rely on arbitrary Tailwind classes generated at runtime.
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
- Orion website
- User docs
- Fix: orion_ui import error
- orion-notebook on PyPI (CLI launcher)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orion_ui-0.6.2.tar.gz.
File metadata
- Download URL: orion_ui-0.6.2.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da59d5af63a77ff0a2525524f0713303143dab77be185ef82dc128e011e60594
|
|
| MD5 |
ddb15b8766d5ad33f6e7558e882ce06f
|
|
| BLAKE2b-256 |
c4075c941aeb40cca9f3d29baf5bf6a5dcc914b71e460ac0139878126f7c7176
|
File details
Details for the file orion_ui-0.6.2-py3-none-any.whl.
File metadata
- Download URL: orion_ui-0.6.2-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a97e37b29c88da8642a8098a41e8703a7f96b997af696d58902a38fcfae4dc78
|
|
| MD5 |
de8e68938086b289f2ab548d8a91c095
|
|
| BLAKE2b-256 |
1d99b4f7e5c91830a98850ba906d07f8e631595ea5b89ea9b4c9ac87eb56a04d
|