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:: https://pypip.in/v/$REPO/badge.png
    :target: https://crate.io/packages/$REPO/
    :alt: Latest PyPI version

.. image:: https://pypip.in/d/$REPO/badge.png
    :target: https://crate.io/packages/$REPO/
    :alt: Number of PyPI downloads

or Markdown:

[![PyPi version](https://pypip.in/v/$REPO/badge.png)](https://crate.io/packages/$REPO/)
[![PyPi downloads](https://pypip.in/d/$REPO/badge.png)](https://crate.io/packages/$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-2024 David Winterbottom
Content licensed under CC BY-NC-SA 4.0.