Skip to main content

Python package to count and plot the number of downloads from Pypi.

Project description

pypiplot

Python PyPI Version License Coffee Github Forks GitHub Open Issues Project Status Downloads

  • pypiplot is Python package to count and plot the number of downloads from Pypi.

Installation

  • Install pypiplot from PyPI (recommended). pypiplot is compatible with Python 3.6+ and runs on Linux, MacOS X and Windows.
pip install pypiplot    # normal install
pip install -U pypiplot # or update if needed

Import pypiplot package

import pypiplot as pypiplot

Example update repos to disk:

from pypiplot import pypiplot

# Download all data for github user.
pp = pypiplot(username='erdogant')

# Update all repos
pp.update()

# Update single repo
pp.update(repo=['bnlearn','hnet'])

Example show repo download stats:

from pypiplot import pypiplot

# Download all data for github user.
pp = pypiplot(username='erdogant')

# Get total stats across all repos
results = pp.stats()

# Get some stats
results = pp.stats(repo=['df2onehot','pca','bnlearn'])

print(results.keys())
# ['data', 'heatmap', 'n_libraries', 'repos']

# Print data
print(results['data'])

#             bnlearn  df2onehot    pca
# date                                 
# 2020-05-01    100.0       18.0  281.0
# 2020-05-02      6.0        4.0  260.0
# 2020-05-03     50.0       16.0  126.0
# 2020-05-04     82.0       64.0   86.0
# 2020-05-05     64.0      157.0   50.0
#             ...        ...    ...
# 2020-09-11    148.0      213.0   78.0
# 2020-09-12     96.0      102.0  144.0
# 2020-09-13     12.0       42.0  197.0
# 2020-09-14    156.0       92.0  244.0
# 2020-09-15     40.0       76.0  225.0

Example make plots

pp.plot_year(title='pypiplot')
pp.plot(title='pypiplot')

Change some of the colors and the minimum cut-off value

pp.plot_year(vmin=100, cmap='interpolateYlOrRd')
pp.plot(vmin=100, cmap='interpolateYlOrRd')

Plot all repos for github username

# Download all data for github user.
pp = pypiplot(username='erdogant')

# Get total stats across all repos
results = pp.stats()

# Get some stats
results = pp.stats()

pp.plot_year(vmin=700, title='Total downloads across all repos')
pp.plot(vmin=100)

Run pypiplot from terminal

Arguments:

* "-u", "--username" : username github
* "-l", "--library"  : library name(s)
* "-p", "--path"     : path name to store plot.
* "-v", "--vmin"     : minimun value of the figure.
> python pypiplot/pypiplot.py -u 'erdogant' -p 'C://pypi_heatmap.html' -v '700'

Citation

Please cite pypiplot in your publications if this is useful for your research. Here is an example BibTeX entry:

@misc{erdogant2020pypiplot,
  title={pypiplot},
  author={Erdogan Taskesen},
  year={2020},
  howpublished={\url{https://github.com/erdogant/pypiplot}},
}

References

Maintainer

  • Erdogan Taskesen, github: erdogant
  • Contributions are welcome.
  • If you wish to buy me a Coffee for this work, it is very appreciated :) Star it if you like it!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypiplot-0.2.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

pypiplot-0.2.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file pypiplot-0.2.0.tar.gz.

File metadata

  • Download URL: pypiplot-0.2.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.12

File hashes

Hashes for pypiplot-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8aa407bc235dc9720fb9c81dd208c94f24cb8a8637fe2cedb189c17cfadaa74c
MD5 3fc94e130763c6f9f416f878e57a3a5e
BLAKE2b-256 5f444a9fc9e4bf54ecd63e2ede44dd3f37546a6ec031a6a5ef5aebce8c1127ac

See more details on using hashes here.

File details

Details for the file pypiplot-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: pypiplot-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.12

File hashes

Hashes for pypiplot-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae1c68ee6cdffb5a89f3b7a6c6d21e3a5232e8058ac80a76601f144d7babedff
MD5 304d293c4eec1651f1e2d9ecb99b056e
BLAKE2b-256 cfdfda5748a3632e99b38d5f2f6d19a756227509ea9acd6fe1e919b116f0e38d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page