[IPython-dev] nbviewer service in scipy central

Nicholas Bollweg nick.bollweg at gmail.com
Sun Aug 2 23:15:25 EDT 2015


As has been pointed out before, nbviewer as such is a pretty thin wrapper
around nbconvert, with most of the decisions there coming from the
nbviewer.*.org site to handle working with a growing collection of
backends, and a fairly high number of burst users.

Where do you host your files? What more do you want from us? If you host
your files as ipynb, say this top result:
http://scipy-central.org/item/22/5/building-a-simple-interactive-2d-data-viewer-with-matplotlib.ipynb

That would just become:
GET
http://nbviewer.org/url/scipy-central.org/item/22/5/building-a-simple-interactive-2d-data-viewer-with-matplotlib.ipynb

You pull that, and do some regex stuff serve it back out. I am pretty sure
we won't throttle you, especially if you are doing some caching yourself:
django makes it pretty easy.

You could even put it in an iframe. We could potentially add some js/CSS
that might detect whether it was embedded if all you really want to do was
to hide our chrome.

If you are going to be doing much custom stuff beyond small regexen, and
you control the files you are rendering, it may actually be easier to
integrate with nbconvert than nbviewer. since you are already running
django, could you not just use something really simple like this flask
snippet:
https://gist.github.com/yoavram/5128702

Throw a little per-view caching on it, and you've got basically what
nbviewer does, without as many headaches. But do be careful, if people are
going to be logging in: it's basically not safe to run untrusted notebooks,
even/especially ones in "moderation queues" where the notebooks would have
javascript-based access to important data. Best practice would be to run
nbviewer (or your djnbviewer) on a wholly separate domain!

On Sun, Aug 2, 2015 at 4:45 PM Thomas Kluyver <takowl at gmail.com> wrote:

> Hi Surya,
>
> Thanks for working on this, I think notebooks would be a very natural
> extension of SciPy Central.
>
> On 2 August 2015 at 12:10, Surya <kasturisurya at gmail.com> wrote:
>
>> I am wondering, if its possible for you guys to provide IPython Notebook
>> rendering as HTTP service for the application? It would help us to deeply
>> integrate feature.
>
>
> On the technical side, yes, it's relatively easy to do notebook rendering
> as an HTTP service. This is the basis of our own nbviewer site, and of
> notebook rendering on Github.
>
> Our web services are generously hosted for free by Rackspace. Kyle Kelley
> will probably respond to this thread soon, and he can talk about what they
> can offer for doing something like this.
>
> Best wishes,
> Thomas
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20150803/f0c782dd/attachment.html>


More information about the IPython-dev mailing list