4 ms·
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
by bhl 7y ago
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 https://news.ycombinator.com/item?id=19677721
- meredydd 7y agoThere 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 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 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-browser/ https://pythontips.com/2019/05/22/running-python-in-the-brow...
- celias 7y agoThe latest podcast from podcast.__init__ is an interview of Meredydd about anvil https://www.pythonpodcast.com/anvil-web-application-development-episode-215/ https://www.pythonpodcast.com/anvil-web-application-developm...
- fleur-de-lotus 7y agoSorry, i am not a native speaker. What is a 'Closet project'? Do you mean it is not open-source?
- muse1489 7y agoCheck out Metatron Discovery(https://metatron.app 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 https://github.com/metatron-app/metatron-discovery
- deleted 7y ago[deleted]
- billconan 7y agoYou can check out: https://epiphany.pub/post?refId=d40c08258ef10f2fe9acff4ab738edc3478e8f5deb232f59082bda5e321529c6 https://epiphany.pub/post?refId=d40c08258ef10f2fe9acff4ab738...