Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: Pynote – Embed Python code and editor, notebooks in any HTML page (getpynote.net)
7 points by laurentabbal 5 months ago | hide | past | favorite | 3 comments


* Empty Python editor <pynote></pynote> Demo: https://getpynote.net/demo-1.html

* Python code <pynote> name = 'pynote' print(name) </pynote> Demo: https://getpynote.net/demo-2.html

* Python file (.py file, either a file hosted on the server or a file loaded from a URL) <pynote src="https://domain.net/code.py"></pynote> Demo: https://getpynote.net/demo-3.html

* Notebook (.ipynb file, either a file hosted on the server or a file loaded from a URL) <pynote src="https://domain.net/notebook.ipynb"></pynote> Demo: https://getpynote.net/demo-4.html

------- OPTIONS -------

<pynote src="https://domain.net/notebook.ipynb" packages="requests" files="" readonly="true" ></pynote>

- packages : list of packages to install (names separated by commas) Demo: https://getpynote.net/demo-5.html

- files : URLs to be added to the Python filesystem for import or manipulation (comma-separated) Demo: https://getpynote.net/demo-6.html

- readonly : read-only editor (false by default) Demo: https://getpynote.net/demo-7.html


Thant looks very nice. I am writing some technical blogs from time to time and this will come in handy. How does it work with the code execution though? Are you running some service somewhere that takes care of it, or is it in browser?


It's in browser with Pyodide.




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

Search: