← Blog

You're so vain, so why not use Vanity?

You're so vain, so why not use Vanity?

Tweet

Thu 16 June 2011

By aclark

In Blog . tags: Plone Python

System Message: ERROR/3 (<string>, line 16)

Unexpected indentation.
A few months ago I created a package called Vanity [0] that

System Message: WARNING/2 (<string>, line 17)

Definition list ends without a blank line; unexpected unindent.

provides easy access to package download statistics from PyPI . You can find the source code here: https://github.com/aclark4life/vanity .

System Message: ERROR/3 (<string>, line 19)

Unexpected indentation.
I love this tool, and I use it all the time to gauge the value of a

System Message: WARNING/2 (<string>, line 20)

Block quote ends without a blank line; unexpected unindent.

package. Of course, downloads are only one criteria you can use to judge the value of a package, and arguably not even a very good one.

System Message: ERROR/3 (<string>, line 22)

Unexpected indentation.
Vanity itself is a good example of this phenomenon. I find it

System Message: WARNING/2 (<string>, line 23)

Block quote ends without a blank line; unexpected unindent.

incredibly useful, but in it's history it has only been downloaded 130 times.

System Message: ERROR/3 (<string>, line 25)

Unexpected indentation.
Other packages I have created with much less value have been downloaded

System Message: WARNING/2 (<string>, line 26)

Block quote ends without a blank line; unexpected unindent.

more times, e.g. plonetheme.aclark_twitter which has been downloaded  674 times. But that package has also been around much longer. So obviously another useful metric would be the time period during which the downloads occurred.

System Message: ERROR/3 (<string>, line 30)

Unexpected indentation.
Anyway, here is how it works:

$ easy_install vanity

Then:

$ vanity <package>

For example:

$ vanity vanity Package vanity has been downloaded 130 times!

Or:

$ vanity plonetheme.aclark_twitter Package plonetheme.aclark_twitter has been downloaded 674 times!

Some of my other favorites:

$ vanity Django[1] Package Django has been downloaded 302111 times!

$ vanity zope.component Package zope.component has been downloaded 210541 times!

$ vanity pyramid Package pyramid has been downloaded 26067 times!

Another thing to consider is if hitting PyPI each time is really

System Message: WARNING/2 (<string>, line 62)

Block quote ends without a blank line; unexpected unindent.

necessary. I'm told there is PyPI data living somewhere else, and in future versions I would like to make vanity use that data by default.

System Message: ERROR/3 (<string>, line 64)

Unexpected indentation.
So, this post is simply to announce Vanity to a wider audience in

System Message: WARNING/2 (<string>, line 65)

Block quote ends without a blank line; unexpected unindent.

the event that some folks may find it useful. Otherwise, I will be happy to continue to watch Vanity downloads crawl ever so slowly towards 200. :-)

Notes [0] By standing on the shoulders of some Plone giants, David Glick,

System Message: WARNING/2 (<string>, line 71)

Block quote ends without a blank line; unexpected unindent.
in particular.
[1] There is a known issue with regard to making Vanity case

System Message: WARNING/2 (<string>, line 73)

Definition list ends without a blank line; unexpected unindent.

insensitive.

Comments !

var disqus_identifier = "2011/06/16/you039re-so-vain-so-why-not-use-vanity/"; var disqus_url = "http://blog.aclark.net/2011/06/16/you039re-so-vain-so-why-not-use-vanity/"; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'http://aclark-blog.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();