shinyobservable
Embed Observable Notebooks in Shiny for Python.
Shinyobservable makes it a breeze to integrate libraries such as D3.
Create any kind of JavaScript visualizations and let Shiny handle your data and interactivity.
Features
- Embed entire notebooks
- Embed selected cells only
- Update data cells to update visualizations
Installation
pip install shinyobservable
# Dev
pip install git+https://github.com/eodaGmbH/py-shiny-shinyobservable
Quickstart
from htmltools import a
from shiny.express import ui
from shinyobservable import Observable, ObservableRenderer
NOTEBOOK = "https://observablehq.com/@d3/zoomable-sunburst"
ui.h1("Observable Notebook in Shiny")
ui.div(a(NOTEBOOK, href=NOTEBOOK, target="_blank"))
ui.hr()
# Render entire notebook
@ObservableRenderer
def render_notebook():
return Observable(NOTEBOOK)
# Render single cells only
@ObservableRenderer
def render_cells():
return Observable(NOTEBOOK, cells=["chart"])
Enjoy your Observable Notebook in Shiny!
See this example on how to update the data of your notebook.
Docs
Release files for shinyobservable 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| shinyobservable-0.2.0.tar.gz | 27.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shinyobservable-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.6 kB
Release files / shinyobservable-0.2.0.tar.gz
| Download URL | shinyobservable-0.2.0.tar.gz |
|---|---|
| Size | 27.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07771fb7821f050a6c3d611ebb3aeb071cd23a6ebf5b592e212620d0895a040e
|
|
BLAKE2b-256 checksum How to use checksums |
320293537326089cf26c3e7e800095b8564b0241ca5f112f043160f9197b7f72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.8.10 Linux/5.15.0-91-generic
|
Release files / shinyobservable-0.2.0-py3-none-any.whl
| Download URL | shinyobservable-0.2.0-py3-none-any.whl |
|---|---|
| Size | 27.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c10a1118821b98c6e9311308343c0c4120cb3fac13e85aab30167a8520f756f5
|
|
BLAKE2b-256 checksum How to use checksums |
3e8062381aa5d90d5042a47daf02ab747b9ae63cedd6f21ef3d7c612b48c8b2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.8.10 Linux/5.15.0-91-generic
|