sloria/pipstat — pull request #6 by livibetter (2014-06-02 10:31:09+00:00)
Title: enable to use URL and choose PyPI server

Originally, I was only thinking about using URL since I always bookmark the URLs of packages, so copy-and-pastiing is easy the way for me to supply, but I would have to manual delete the part before package name.

While thinking about this, I recalled there is a [testpypi][] server, although it's not a real one and I am not aware of any other package indexing websites using PyPI. However, it might still be a good idea to be able to select any PyPI server the user prefer to query on.

[testpypi]: https://testpypi.python.org/pypi

The following is a sample output:

```
$ python pipstat.py https://pypi.python.org/pypi/pyfiglet
Fetching statistics for 'https://pypi.python.org/pypi/pyfiglet'. . .

Download statistics for pyfiglet
================================
Downloads by version
0.6.1dev [ 0 ]
0.6.1 12/09/14 [ 2,880 ] *****************************************************

Min downloads: 0 (0.6.1dev)
Max downloads: 2,880 (0.6.1)
Avg downloads: 1,440
Total downloads: 2,880
```

I put the full URL in the output. You might want to edit the format, I am not sure if this is the best.