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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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