I’ve been experimenting the last couple of days with a little Python just to see what is possible. I think my end goal is to make some scripts that can interact with the iNat API and other data sources, and then publish / share these in a way that other folks can run them easily without having to do much setup on their end (ideally just running from a web browser, since every computer and mobile device has one already nowadays).
As best as I could tell, Jupyter notebooks (.ipynb files) are the best format to share Python code, and it looks like setting up a JupyterLite instance in GitHub Pages is an easy and fast (and free) way of then making those notebooks available to the masses. So I set up a test GitHub repo, and made a sample Jupyter notebook available: https://jumear.github.io/stirpy/lab/index.html?path=iNat_APIv1_get_observations.ipynb.
One issue I’m noticing about this setup is that if the end user updates the code in the notebook, their own version of the notebook is saved, and then if I push out a new version of notebook to my repo, the end user won’t see the updated version unless they clear their browser cache, browse privately, or manually delete / rename their version of the notebook. (I don’t think it would be obvious that folks should delete a notebook to get the most recent version.)
So then I’m wondering if anyone has come across any better ways of sharing Python code or have any ideas to improve my existing setup? I think I want to steer clear of Colab because I don’t want to require folks to have a Google account to run code, and I think I want to steer clear of Binder, too, since I get the sense that it’s on its way out due to lack of funding (to be eventually replaced with JupyterLite maybe).