PyPI README badges

Thanks to @kuramanga, it’s now possible to add shiny PyPi badges to your Python project READMEs that indicate the latest released version on PyPI and the total number of downloads.

django-oscar PyPi badges

This screenshot is taken from django-oscar’s README.

Embed these badges in your own repo as Restructured text:

.. image::$REPO/badge.png
    :alt: Latest PyPI version

.. image::$REPO/badge.png
    :alt: Number of PyPI downloads

or Markdown:

[![PyPi version]($REPO/badge.png)]($REPO/)
[![PyPi downloads]($REPO/badge.png)]($REPO/)

The code is available on Github, see also Olivier Lacan’s shields repo.


Something wrong? Suggest an improvement or add a comment (see article history)
Tagged with: python
Filed in: tips

Previous: A useful Git post-checkout hook for Python repos
Next: Conditional logic in Django forms

Copyright © 2005-2023 David Winterbottom
Content licensed under CC BY-NC-SA 4.0.