Skip to main content
# python-popcon

Get Debian [popularity contest](https://popcon.debian.org/) values for given
packages.


## Installation

```bash
$ pip install popcon
```


## Usage

The usage of this module is easy:

```python
>>> import popcon
>>> popcon.package('reportbug-ng')
{'reportbug-ng': 323}
>>> popcon.package('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`.

```python
>>> popcon.package_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
{'reportbug': 177670}
```

Release files for python-popcon 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-popcon 2.0.0
File Size Uploaded
python-popcon-2.0.0.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-popcon 2.0.0
File Interpreter ABI Platform
python_popcon-2.0.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size:17.0 kB

Release files / python-popcon-2.0.0.tar.gz

Download URL python-popcon-2.0.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
86762bfed411109cc94e085d3363f7745d78479e33f037fb8ee64a724579c99a
BLAKE2b-256 checksum
How to use checksums
c6ba04c930eea9556420324be9649a77ee90d5650af044c4178295a8ed5059d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Release files / python_popcon-2.0.0-py2.py3-none-any.whl

Download URL python_popcon-2.0.0-py2.py3-none-any.whl
Size 12.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c345ea9751cea36d2da44c2364db1b3d046765923ae0804a6fcb53ac270354ff
BLAKE2b-256 checksum
How to use checksums
a84ad4010ec7a946f30e2295c39cef5f39121c76b63b9cf92dba7928fb400a78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Release history Release notifications | RSS feed

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.1

2 release files

This release

2.0.0 This release

2 release files

1.5.1

2 release files

1.5.0

1 release file

1.4

1 release file

1.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page