Python interface to Debian's popularity contest database
Project description
python-popcon
Get Debian popularity contest values for given packages.
Installation
$ pip install popcon
Usage
The usage of this module is easy:
>>> import popcon
>>> popcon.packages(['reportbug-ng'])
{'reportbug-ng': 323}
>>> popcon.packages(['reportbug-ng', 'reportbug'])
{'reportbug-ng': 323, 'reportbug': 75065}
The raw data (vote, old, recent, no-file) is also available, the sum of the raw
numbers is the number of installations as reported by popcon.package
.
>>> popcon.packages_raw(['reportbug-ng', 'reportbug'])
{'reportbug-ng': Package(vote=50, old=187, recent=86, no_files=0),
'reportbug': Package(vote=5279, old=59652, recent=10118, no_files=16)}
Behind the scene popcon will try to use cached information saved in a file in
the ~/.cache/popcon directory. If the relevant file is not available, or older
than EXPIRY
seconds (default is 7 days) it will download fresh data and save
that.
The cached data will be kept in memory unless KEEP_DATA
is set to False.
Command Line Interface
popcon reportbug python
PACKAGE VALUE
reportbug 180558
python 110709
it also supports a more verbose mode on the command line:
popcon --verbose reportbug python
PACKAGE VOTE OLD RECENT NO FILES
reportbug 5929 149243 25315 71
python 3985 103591 3066 67
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for python_popcon-3.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f4caba2a6ea6762a4d024d3f6de8235a80ba22068b9b49e0bcc857372e00ae4 |
|
MD5 | d5cf58e4a645e19a932b9c35012ba4c3 |
|
BLAKE2b-256 | c8d4dde057b9d9c6ab48bb440a49f0f1b5e55c03af5accd3346d4b198acb4c87 |