Python Training by Dan Bader

Give your open-source project social proof with image shields

When developers decide if they’re going to use your open-source project they (often unconsciously) look at various signals to judge its quality. An important quality signal is social proof, that is, potential users want to know how many other developers use your project.

A good proxy for “how many other developers are using this” is a downloads per month number. Packaging directories like npm or PyPI provide these download stats publicly.

The download numbers reported there are likely a little inflated, for example, due to build bots installing the package.

But still, they’re a pretty good approximation.

More downloads indicate higher popularity which people often equate with more credibility.

(You see, this is open-source thing is really just like high-school :P).

Therefore, advertise the download numbers to increase the chances of someone trying out your project.

And by advertising I mean that the numbers should be clearly visible to anyone remotely interested in your library :-)

Image shields to the rescue

A quick and hassle-free way to share your downloads number with the world is by including a downloads image shield in your project’s README file.

You’ve probably seen these before. Here’s what I’m talking about:

What are image shields

Image shields are small auto-generated images provided by a service like img.shields.io. There’s no signup necessary and all configuration happens through the image URL.

For example, this is the URL for the image above:

https://img.shields.io/npm/dm/datadog-metrics.svg

The URL follows a scheme defined by the service. For downloads-per-month shields on img.shields.io you’d use this URL:

img.shields.io/<packaging service>/dm/<package name>.svg

For a Python package on PyPI you’d use something like img.shields.io/pypi/dm/schedule.svg, and for a NodeJS library on npm you’d use img.shields.io/npm/dm/datadog-metrics.svg.

There are many more examples on the img.shields.io home page.

Different styles

You also get to pick different styles for your image shields. For example there’s a nice flat theme that you can use by appending ?style=flat-square to the URL.

Here’s what an image shield looks like with the flat theme applied to it:

<strong><em>Improve Your Python</em></strong> with a fresh 🐍 <strong>Python Trick</strong> 💌 every couple of days

Improve Your Python with a fresh 🐍 Python Trick 💌 every couple of days

🔒 No spam ever. Unsubscribe any time.

This article was filed under: developer-marketing.

Related Articles:
Latest Articles:
← Browse All Articles