Sharing your python code

python
Revisión a las muchas alternativas
Author

sebastiandres

Published

September 9, 2021

Apart from my favorite tools, jupyter notebook and streamlit, there are other alternatives. This is a preliminary list to enumerate and compare them.

Online repository

The most basic version for sharing your code (whether python, jupyter notebook or others) is simply to store it in an online repository, such as github, bitbucket or others. It has the advantage of providing all the detail, with the copyright or copyleft you want, but the user has to have the knowledge to install it and try it out.

Online Jupyter Notebooks

Another option for sharing python code is to include it in a jupyter notebooks. The most common option is to have Jupyter Notebook/Lab installed locally and thus run the notebooks, but many alternatives have emerged to share them online. Some of the most common options are: binder or Google Colab. There are other alternatives that work like notebooks, such as Kaggle Kernels, CoCalc or Datalore, but I do not know them in depth.

Web development and API

For web development and apis there are multiple alternatives: * falcon: A framework for building APIs (+9 years) * FastAPI: Another web framework for building APIs, more recent (+3 years) and growing in popularity. * web2pi: A web framework inspired by Ruby on Rails and Django (+13 years). I do not know anyone who uses it. * bottle: A minimalist but extensible web framework, with +12 years of development. * flask: A minimalist but extensible web framework, with +11 years of development. Similar to bottle? Yes, very much. Despite being more recent and inspired by its sibling, Flask is much more popular. * pyramid: a web framework that seeks to sit between the micro-frameworks and the mega-frameworks: a framework that lets you start small but scale without problems if needed. * Django: a fully pythonic web framework with a model–view–controller (MVC) scheme, and with +15 years of development. It is not simple, but it has everything needed to compete with the “famous” frameworks of other languages.

Dashboards, Web apps and data apps

Between web development and jupyter notebooks there is a fertile field of frameworks and libraries for making dashboards and webapps. The idea is that you can create and share interactivity generating little code additional to what your base code needs: * Plotly and Dash * Voila * Gradio * Panel * Streamlit: lets you generate interactive web pages in a simple and intuitive way. There is a tradeoff of flexibility for simplicity and predefined design.

For now I know little about the first ones, but I hope to update this list with more details soon.