-
Notifications
You must be signed in to change notification settings - Fork 948
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
Question - Can i use ipywidgets without a notebook #877
Comments
It is possible to embed widgets in a webpage, just like what you can see here: The equivalent with a connected back end is not supported yet. |
@SylvainCorlay |
No I mean that you can embed widgets in your blog or personal website, just like on the jupyter.org website. |
@SylvainCorlay from ipyleaflet import Map
Map(center=[34.6252978589571, -77.34580993652344], zoom=10) Looking at the examples, they are executed in notebooks (which in turn generate javascript rendered on the webpage). The widgets to my knowledge is basically a bunch of javascript code + data generated by the Python code executed. So, where is this python code being executed? |
You author your widgets / visualization from the notebook. Then in the menu |
The javascript is loaded independently, it's not generated by the python. The state of the widgets is communicated back and forth with python. You can embed the javascript + initial state (which provides some interaction that is entirely in javascript). Check out the examples in the jupyter-js-widgets repo, or use the 'Embed Widgets' feature Sylvain mentioned above. You can also have javascript that starts up a kernel on a python server somewhere and communicates with it, embedding the widgets from that. See the web3 example for this. |
Closing as answered - please reopen if you have more questions or want to continue the discussion. |
Can I use the Jupyter_client api to execute code against a kernel and still use ipywidgets?
Currently when I do this, I get the following response from the Kernel:
Note: The widgetsnbextension is already enabled.
The text was updated successfully, but these errors were encountered: