Is there an easier way? If I gave you a python script and some html what would you use to get it behind a www in the least amount of time possible?
Jupyter Nbconvert: Jupyter Nbconvert is a command-line tool that allows you to convert Jupyter notebooks into various formats, including HTML, PDF, and Markdown. You can use the nbconvert command to convert your Jupyter notebook into an HTML file, which you can then upload to a web hosting service or a file-sharing platform like GitHub or GitLab. To use this method, you will need to have Jupyter installed on your computer.
Binder: Binder is a free service that allows you to turn your Jupyter notebook into a live, interactive website that can be accessed by anyone. Binder creates a virtual environment that includes all the dependencies required to run your notebook and launches it in a web browser. To use this method, you will need to upload your Jupyter notebook to a GitHub repository and provide a link to your repository to Binder.
Google Colab: Google Colab is a free cloud-based service that allows you to create and run Jupyter notebooks in a web browser. You can create a new notebook in Colab, write your code, and then export it as an HTML file using the nbconvert command. You can then download the HTML file and upload it to a web hosting service or file-sharing platform.
It's really not too tough: https://nbconvert.readthedocs.io/en/latest
Note that this is purely if you want to present your notebook as a static page. If you want it to be more interactive you're going to end up with something more complex.
The framework repository at GitHu https://github.com/mljar/mercury
Im working also on cloud offering so you will upload notebooks and set domain. It is available in alpha at https://cloud.runmercury.com
You can either export a static site [1] (and host on GH pages or S3), or, if you need backend logic, you can add Python functions [2] and serve on your favourite host (we use Fly).
We have specific Jupyter integration to automatically convert your notebook into an app [3].
[0] https://github.com/datapane/datapane
[1] https://docs.datapane.com/reference/reports/#datapane.proces...
[2] https://docs.datapane.com/apps/overview/
[3] https://docs.datapane.com/reports/jupyter-integration/#conve...
Not very polished I admit but it's allowed a recent prototype I built to get enough traction that someone else wants to build the proper version now. I'll tell them to come and check this thread ;-)
(Plot twist if that person is op...)
If interactive, http://tmpenv.com lets you clone a github repo repo, drop your notebook in, and gives you a button for spinning up instances of it. We’re a few weeks away from making it generally available but I’m happy to give you access if you’re interested.
If not interactive, most static hosting sites will let you run nbconvert to turn an ipynb file into HTML.
Plotly Dash is a pretty painless all-python-no-javascript way to build an interactive UI on top of whatever your data source is, but I have no idea how well (or not) it scales.
Not sure about ease relative to other alternatives.
https://jupyterlite.readthedocs.io/en/latest/try/lab/
Can be hosted out of GitHub pages.
If you want to use an actual .ipynb file as the "python script", then I'd add in Streamlit.
Probably a bit dated now, but I tried a bunch of these tools when I was working on a comparison article[0] that might still be useful.
https://www.datarevenue.com/en-blog/data-dashboarding-stream...
Example (not my repo) - https://github.com/MKAbuMattar/dockerized-jupyter-notebook/b...
Forgive my probably being pedantic: if it's the whole notebook with all it's functionality of changing code in cells that's to be shared, I'd have said colab as someone else did.
If it's some of the plots or data frames to be visualized with some means of adjusting them, streamlit or a similar product, as long as it doesn't have to be too polished. Or plotly/dash? (Irrc, I may have the name wrong).
Or if it's just running some code and returning something, flask, e.g. could be fine.
Imo it really depends on the use case.
None of these produce slick professional-looking pages, but I prefer just exposing my source code and letting people use it. Also, my stuff isn't profound enough to deserve real web hosting, or the effort to turn it into "software."
If it's supposed to serve a lot of users, then Dash.
Fully open sourced, makes it easy to make reactive apps with small changes, can even configured as a graphical REPL.
jupyter nbconvert --to orgmode a.ipynb
Then export it directly from orgmode to html (or pdf or latex or info or ...)
Used both tens of times.
you mention you don't want to deal with AWS, if it's because of ad-hoc installation concerns and nothing else you can just run your notebooks in ready-made solutions like Google Colab, or Jupyter-book in Github ( https://github.com/executablebooks/jupyter-book ))
that would cover a lot of use cases right away without next to no learning curve
If you don't want to deal with AWS or similar, in that case:
- if it's a static notebook then you can obviously render it and serve the web content (might seem obvious but needs to be considered)
- if it's dynamic but has light hardware requirements, you can try jupyterlite which runs in the browser and should do a pyodine (webassembly CPython kernel) can do: https://jupyterlite.readthedocs.io/en/latest/try/lab/
- otherwise, you can try exposing a dockerised jupyter env ( as in https://github.com/MKAbuMattar/dockerized-jupyter-notebook/b... ) or even better a nixified one ( https://github.com/tweag/jupyenv )
there might be other approaches I'm missing, but I think that's pretty much it that doesn't entail some proprietary solution or an ad-hoc installation as you've been doing