Live data from Hacker News

Voilà turns Jupyter notebooks to standalone web applications

blog.jupyter.org

11–20 of 52 posts

Re: Voilà turns Jupyter notebooks to standalone web applications

#11
post #10

why just jupyter? why not pure python as well?

What do you mean? Jupyter notebooks are usually pure Python apart from (sometimes) interactive widgets, which have Javascript behind them since it's in a browser. I don't think this is much use without widgets, so maybe you mean something else?

I mean why can't I write python outside of jupyter and generate these dashboards? Or can I?

Re: Voilà turns Jupyter notebooks to standalone web applications

#12
Is there any work on bringing Python into the browser like with JavaScript? At the beginning of the year, I was looking at the best way of making an interactive textbook either with Python (requiring a backend it seemed), or with JavaScript via D3. You can still use Jupyter Notebooks with JS; there's a library called BeakerX by Two Sigma that does this.

I went the D3 route but it was hard to stay motivated when most of the time I was just learning how d3 and JavaScript worked instead of the interactability part itself. Closet project I found is Pyodide which was posted here [1]. Wondering if I should wait for someone to come up with a magicul implementation before restarting since this area seems to be experimental (?).

[1] https://news.ycombinator.com/item?id=19677721

Re: Voilà turns Jupyter notebooks to standalone web applications

#14
post #5

This is awesome! Is there a way to host these somewhere easily? Like a git push of a notebook to a repo and you get voila powered renders (and I assume some kind of automagic lightweight kernel behind the scenes which executes the code if required). It reminds me of DeepNote[0] though that is geared towards the producers of notebooks rather than consumers. [0]: https://beta.deepnote.org/

I'm going to try this out at work, using the following approach: - gitlab repo that hosts the notebook - gitlab cicd configured to build a docker container running Voila, on every push to dev or master branch - automated deployment of freshly built containers to kubernetes

Don't know if there's easier solutions, this will require some setting up

Re: Voilà turns Jupyter notebooks to standalone web applications

#15
post #12

Is there any work on bringing Python into the browser like with JavaScript? At the beginning of the year, I was looking at the best way of making an interactive textbook either with Python (requiring a backend it seemed), or with JavaScript via D3. You can still use Jupyter Notebooks with JS; there's a library called BeakerX by Two Sigma that does this. I went the D3 route but it was hard to stay motivated when most…

There is indeed!

I'll start with the one I founded: Anvil, which is an end-to-end Web dev system with Python (plus a drag-and-drop UI builder, and lots more good stuff): https://anvil.works

Here's our version of how to turn a Jupyter notebook into a web app: https://anvil.works/blog/jupyter-notebook-to-web-app

(tl;dr there's a library you can `pip install`. It makes a websocket connection to Anvil, and then your code - wherever it's running, including a Jupyter notebook - can do everything you can do in our serverless environment, such as handling requests from browser code.)

But of course, we are neither the first nor the last to think Python in the browser is a good idea. A colleague of mine did a survey and comparison of the major open source implementations (including PyIodide, which you mention, and Skulpt, which is what Anvil uses):

https://pythontips.com/2019/05/22/running-python-in-the-brow...

Re: Voilà turns Jupyter notebooks to standalone web applications

#16
post #5

This is awesome! Is there a way to host these somewhere easily? Like a git push of a notebook to a repo and you get voila powered renders (and I assume some kind of automagic lightweight kernel behind the scenes which executes the code if required). It reminds me of DeepNote[0] though that is geared towards the producers of notebooks rather than consumers. [0]: https://beta.deepnote.org/

At Kyso [1] we let you do this (I'm one of the founders) - you can run Jupyterlab online and start servers inside Jupyterlab that you can share with the world (Jupyterlab will run on instance-id.cloud.kyso.io).

You can install viola and then just run it on port 8000 from within the jupyterlab terminal and you can share the url with anyone (it will be instance-id-8000.cloud.kyso.io)

We're actually thinking of supporting Viola natively in the next few weeks, what kind of app do you want to run?

[1] https://kyso.io

Re: Voilà turns Jupyter notebooks to standalone web applications

#17
post #12

Is there any work on bringing Python into the browser like with JavaScript? At the beginning of the year, I was looking at the best way of making an interactive textbook either with Python (requiring a backend it seemed), or with JavaScript via D3. You can still use Jupyter Notebooks with JS; there's a library called BeakerX by Two Sigma that does this. I went the D3 route but it was hard to stay motivated when most…

Sorry, i am not a native speaker. What is a 'Closet project'? Do you mean it is not open-source?

Re: Voilà turns Jupyter notebooks to standalone web applications

#18
post #12

Is there any work on bringing Python into the browser like with JavaScript? At the beginning of the year, I was looking at the best way of making an interactive textbook either with Python (requiring a backend it seemed), or with JavaScript via D3. You can still use Jupyter Notebooks with JS; there's a library called BeakerX by Two Sigma that does this. I went the D3 route but it was hard to stay motivated when most…

Sorry, i am not a native speaker. What is a 'Closet project'? Do you mean it is not open-source?

"closest project" probably.

Re: Voilà turns Jupyter notebooks to standalone web applications

#19
post #12

Is there any work on bringing Python into the browser like with JavaScript? At the beginning of the year, I was looking at the best way of making an interactive textbook either with Python (requiring a backend it seemed), or with JavaScript via D3. You can still use Jupyter Notebooks with JS; there's a library called BeakerX by Two Sigma that does this. I went the D3 route but it was hard to stay motivated when most…

Sorry, i am not a native speaker. What is a 'Closet project'? Do you mean it is not open-source?

I think it was a typo, they meant "closest project", or most similar.

Re: Voilà turns Jupyter notebooks to standalone web applications

#20
post #4

This is huge - This basically allows your analysts and data scientists to have a company wide impact by productionizing your code. Plotly dash tried to do this, but was a bit weird to use.

I've been using the Jupyter AppMode plugin for a few years, it has been very useful for internal tools. Voilà looks similar, with more sheen, it's going to enable true rapid SPA development.

Voila author here: a major difference with AppMode is that AppMode is merely hiding the notebook interface, but still allows for arbitrary code execution.

Voila is meant for producing secure web apps.

Post reply on HN