Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add utilities for working in Pyodide #12118

Open
philippjfr opened this issue May 4, 2022 · 0 comments
Open

[FEATURE] Add utilities for working in Pyodide #12118

philippjfr opened this issue May 4, 2022 · 0 comments

Comments

@philippjfr
Copy link
Contributor

philippjfr commented May 4, 2022

Problem description

With the recent announcement of pyscript and jupyterlite there is now a ton of buzz around WASM Python builds, specifically pyodide. However the code required to get Bokeh to a) render in pyodide and b) bi-directionally sync Python with Javascript is not totally straightforward and some utilities would aid a user.

Feature description

In recent releases of Panel I've started incorporating utilities for displaying panel and bokeh components in the DOM and bi-directionally sync the Python and Javascript Document instances. That code now lives in https://github.com/holoviz/panel/blob/master/panel/io/pyodide.py but most of it is not specific to Panel at all and could live in Bokeh. I've also started working on a panel convert utility that takes a Panel/Bokeh script and exports it to an HTML file using pyodide or pyscript. It would be great to offer some or all of these utilities directly to Bokeh users.

Potential alternatives

One issue is that pyodide is just one particular implementation of a WASM Python build. While for now it is the default implementation there are efforts to get CPython to compile directly to WASM and these approaches may eventually replace Pyodide. For now though pyodide is the de-facto standard and is the only solution that provides convenient APIs installing packages, interacting with the DOM and some limited network access.

Additional information

No response

@mattpap mattpap added this to the short-term milestone May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants