Hacker News new | past | comments | ask | show | jobs | submit login

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




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...


The latest podcast from podcast.__init__ is an interview of Meredydd about anvil

https://www.pythonpodcast.com/anvil-web-application-developm...


Check out Metatron Discovery(https://metatron.app) They have jupyter notebook connection feature. And it is open source. Here is the github repo: https://github.com/metatron-app/metatron-discovery



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.


"closest project" probably.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: