Embedding Jupyter in web app

3,527 views
Skip to first unread message

Philip Matheson

unread,
Apr 10, 2017, 10:12:44 AM4/10/17
to Project Jupyter
Hi all, 

I'm working on a web application for teaching data science. I would like to do something like Kaggle does with their kernels feature and embed Jupyter into the application seamlessly. I'm just starting to research how this might work and wondering if anyone can point me to a project or documentation that might discuss this type of thing.   

So far I've figured out I can write my own Authenticator for Jupyter Hub, customize the Jupyter templates an use nbviewer to display notebook results. I could probably accomplish most of what I want with these features but I'm wondering if maybe there's other ways. 

Thanks in advance!

-phil 

Thomas Kluyver

unread,
Apr 11, 2017, 6:43:47 AM4/11/17
to Project Jupyter
On 10 April 2017 at 15:12, Philip Matheson <phi...@gmail.com> wrote:
I'm just starting to research how this might work and wondering if anyone can point me to a project or documentation that might discuss this type of thing.   

It depends quite a bit on how much of Jupyter you want to embed - do you want to make your own interface that talks to Jupyter kernels? Or embed notebooks into your own website?

Thebe is an example of talking to Jupyter kernels from a different web interface:
https://oreillymedia.github.io/thebe/

Thomas

Philip Matheson

unread,
Apr 11, 2017, 12:04:48 PM4/11/17
to Project Jupyter
Thank you Thomas this helped a lot. I don't think I need a whole new interface but I found a reference to tmpnb on that page which got me wondering, should use that instead of JupyterHub?  

My use case will be pretty simple . Users will login to an existing website where they have a profile. Part of that profile will be a list of notebooks they have created. Clicking on a notebook will render the html output of nbconvert. 

I think I understand how all of that will work... 

The create/edit functionality should be something like : 

User clicks on button to create/edit a notebook. The user is authenticated. The notebook app is launched in a new window with a subset of functionality and some ability to upload data. 

tmpnb seems like a nice approach b/c the notebook container is automatically created and destroyed when it's not being used. I'm not sure about how well it handles the authentication piece though. 

Maybe some one could give me a rundown of the difference between tmpnb and  JupyterHub? I'm not finding much info on this subject. 
 
Thanks again! 

-phil 

Thomas Kluyver

unread,
Apr 11, 2017, 12:09:55 PM4/11/17
to Project Jupyter

On 11 April 2017 at 17:04, Philip Matheson <phi...@gmail.com> wrote:
Maybe some one could give me a rundown of the difference between tmpnb and  JupyterHub?


The core difference is that Jupyterhub knows about authenticated users, so you can store notebooks and data tied to user accounts, and make those accessible to the user. Tmpnb is for ephemeral notebook sessions, so it doesn't know about spefic user identities. From your description, Jupyterhub sounds like the better fit for you.

Thomas
Message has been deleted

Dame NDIAYE

unread,
Mar 12, 2018, 5:24:44 PM3/12/18
to Project Jupyter
Hello Everyone!! Is there someone here to help me! I am working on a similar project like yours Philip and I would know if you finally find a way to do this, I mean to embed jupyter notebook in your web app which will allow users to make and run their python code and save their notebook by the way.

eddie...@gmail.com

unread,
Jul 18, 2018, 2:23:34 AM7/18/18
to Project Jupyter
Hi Phil,

Did you succeed on this? Can you share a template or something?

Michael Milligan

unread,
Jul 20, 2018, 5:41:31 PM7/20/18
to Project
Incidentally, you should know that tmpnb is deprecated - the recommended path forward would be BinderHub (which is basically Jupyterhub+Kubernetes), but using Jupyterhub with the tmpauthenticator plugin would also be an option.


Although it sounded like the original poster really just wanted to run nbconvert behind a web app.


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/82871f8e-538f-486b-83a6-dfea7d549d6f%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Michael Milligan, Ph.D.         | Supercomputing Institute
Assistant Director for          | University of Minnesota
   Application Development      | mill...@umn.edu
www.msi.umn.edu/staff/milligan  | Phone: 612-624-8857

jeenesh...@gmail.com

unread,
Aug 24, 2018, 2:09:01 AM8/24/18
to Project Jupyter
Hi, I want to embed jupyter notebook to my application my application based on node and angular 
how can i i teried using i frame but it gives csp headrs error plz help me .

tanks 

abhay yadav

unread,
Apr 5, 2019, 7:26:31 AM4/5/19
to Project Jupyter
@jeenesh 
Did you get any Solution 
If yes kindly share 
Reply all
Reply to author
Forward
0 new messages