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

Make it easy to create Python Widgets #2783

Open
MarcSkovMadsen opened this issue Oct 5, 2024 · 2 comments
Open

Make it easy to create Python Widgets #2783

MarcSkovMadsen opened this issue Oct 5, 2024 · 2 comments

Comments

@MarcSkovMadsen
Copy link

MarcSkovMadsen commented Oct 5, 2024

Please make it easy to create Perspective widgets for specifically Panel but in general for non-Jupyter interactive frameworks like Streamlit, Dash, Panel, Gradio, Marimo and more.

What makes it hard for other frameworks and Panel in particular is its not possible to reuse parts of the current jupyter widget implementation. Its tied to ipywidgets/ traitlets everywhere.

Today it is technically possible to improve this situation by

  • Making as much of the Python implementation reusable by non-Jupyter interactive frameworks via mixin classes.
  • Migrating from ipywidgets to AnyWidget. This will make the javascript useful for other frameworks. See AnyWidget AFM specification and Panel AnyWidgetComponent.

I have a feature request with Panel also Enable Perspective to support large tables.

@MarcSkovMadsen
Copy link
Author

Something that I believe would make the implementation easier is if we could communicate via existing communication channels instead of a new, extra web socket. For example Panel can run on both Tornado and FastAPI server and the data developer should not have to setup the communication this should be done by Panel behind the scenes.

@texodus
Copy link
Member

texodus commented Oct 6, 2024

Something that I believe would make the implementation easier is if we could communicate via existing communication channels instead of a new, extra web socket.

You can do this already and PerspectiveWidget does not create an 'extra" WebSocket, but PerspectiveTornadoHandler does not support multiplexing and it sounds like you tried to add Perspective virtual support to your framework by bolting this handler onto your existing tornado server. Take a look at the PerspectiveTornadoHandler implementation for an example of how to implement a Client/Session stream over an arbitrary transport (like a shared WebSocket with your choice of multiplexing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants