pyobservablejs
pyobservablejs brings reactive Observable notebooks
to Python. Build cells, charts, and browser inputs, or import an existing notebook.
Display the whole notebook or selected cells in JupyterLab, marimo, VS Code,
Colab, and other anywidget hosts.
Try it in your browser · Quickstart · Examples · API reference
Start
Install in a Python 3.11 through 3.14 notebook environment:
pip install pyobservablejs
Create an input and a result that updates when it changes:
import observablejs as obs
notebook = obs.Notebook(
obs.ojs(
"viewof threshold = Inputs.range([0, 1], {value: 0.5, step: 0.1})",
key="control",
),
obs.js(
"const doubled = threshold * 2; display(md`Doubled: **${doubled}**`);",
key="result",
),
)
view = notebook.view()
view
Cells run in the browser through Notebook Kit.
Its Inputs library loads from the network. Use notebook and module sources you
trust, since their JavaScript runs in the host page.
Experimental: the API may change between releases.
Build on it
- Compose views.
notebook.view("result")displays the result and evaluates its dependencies. Select and arrange cells. - Connect Python.
notebook.update_variables({"threshold": 0.8})updates mounted views. Read named results throughview.state. Send values and read results. - Bring notebooks and data. Load Notebook Kit HTML, public ObservableHQ notebooks, local files, and JavaScript modules. Create and import notebooks.
- Inspect and extract. Browse cells, imports, attachments, and dependencies. Read datasets as Arrow or projected rows. Inspect notebook data.
- Work with agents. The installed package carries instructions that match its API. Read the packaged skill or the documentation map.
Documentation · Troubleshooting · Contributing · MIT license
Built on Observable's Notebook Kit
and anywidget.
pyobsplot informed the Python variable API.
Release files for pyobservablejs 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyobservablejs-0.1.1.tar.gz | 587.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyobservablejs-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:1.2 MB
Release files / pyobservablejs-0.1.1.tar.gz
| Download URL | pyobservablejs-0.1.1.tar.gz |
|---|---|
| Size | 587.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c213b79bd91c4c79d7b282b716c67cbec8662de12950bcda60c405dd154aa997
|
|
BLAKE2b-256 checksum How to use checksums |
252f35f306dcc054634e851bc9602c76dcbb1c96ea3e00d2fa84f83d358d3b37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.11 {"installer":{"name":"uv","version":"0.12.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pyobservablejs-0.1.1-py3-none-any.whl
| Download URL | pyobservablejs-0.1.1-py3-none-any.whl |
|---|---|
| Size | 614.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f4f9b47e73784b68518b094d63d12594099bfd19dff5bf85e727d2597eaef96
|
|
BLAKE2b-256 checksum How to use checksums |
3841dcfd2ef2b63396bf37bc0d1b25ac177f07b067d09dcc890b59578807d4b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.11 {"installer":{"name":"uv","version":"0.12.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|