Github status badges for Python projects

The status badges for Python-based projects are usually added on the README.md page of the project. These badges provide useful information to the visitors of your GitHub repo like the supported Python versions of your Python project, what is the recent version of the PyPI release of your Python package and the status of the build pipelines in your Python project.

In this post, we will see what are various status badges that you could add to your Python project on GitHub and how you could add these status badges.

Current Pypi version status badge

To add the recent Pypi version of your Python package to your Python Github repo, you could use image links provided by Shields. The Python package name when supplied with the shields link gives you an image with the recent version of your package on Pypi. For example the link "https://img.shields.io/pypi/v/data-understand" will result in the following image for the python package data-understand:-

To add this image to your markdown file, you would need the following line of markdown code in your README.md.

![PyPI data-understand](https://img.shields.io/pypi/v/data-understand)

License status badge

To add the license (MIT, Apache etc.) of your Python package to your Python Github repo, you could use the "https://img.shields.io/badge/License-MIT-blue.svg" link from Shields. The aforementioned link adds the following status badge image for the MIT license:-

To add this image to your markdown file, you would need the following line of markdown code in your README.md.

![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)

Generically, you can add any licensed image using the link "https://img.shields.io/badge/License-<license-name>-blue.svg" if you replace the "<license-name>" with whatever license name you want.

Supported Python versions status badge

To add the supported Python versions of your Python package to your Python Github repo, you could use an image link from Shields. The Python package name when supplied with the shields link gives you an image with the supported Python versions of your package on Pypi. For example the link "https://img.shields.io/pypi/pyversions/data-understand" will result in the following image for the supported Python version of data-understand:-

To add this image to your markdown file, you would need the following line of markdown code in your README.md.

![versions](https://img.shields.io/pypi/pyversions/data-understand)

Number of PyPI downloads status badge

The pepy.tech helps track the number of downloads of your Python package from Pypi. This helps to know which versions are being used most frequently by your customers. To add the number of downloads of your Python package from PyPI to your Python Github repo, you could use an image link from pepy.tech. The Python package name when supplied with the pepy.tech gives you an image with the number of downloads of your Python package from Pypi. For example the link "https://static.pepy.tech/badge/data-understand" will result in the following image for the supported Python version of data-understand:-

To add this image to your markdown file, you would need the following line of markdown code in your README.md.

[![Downloads](https://static.pepy.tech/badge/data-understand)](https://pepy.tech/project/data-understand)

There are many other status badges that you could add like the status of builds from Github actions. These are straightforward to add as you could get the markdown code for the status badge from the GitHub actions and add the markdown code in the README.md.