Skip to main content

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

Project description

pypiplot

Python PyPI Version License BuyMeCoffee Github Forks GitHub Open Issues Project Status Downloads 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-1.0.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

pypiplot-1.0.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pypiplot-1.0.1.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.5

File hashes

Hashes for pypiplot-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0a432f7742973db9417753f573503857015ea515c16f07f26a13264e66c3be84
MD5 dc4f9dade8cf22488814a7245483e4c4
BLAKE2b-256 03d1a5cb2294e2d369c2dcda1e19a5f24add201a0609f5febb30535363e743c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pypiplot-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.5

File hashes

Hashes for pypiplot-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b4d79c9f3f6dbac8155c99e0f9fce01af9abc13978dd09b918c92c0b28cf418e
MD5 779d501841795a9cbda5fb82cad47fb7
BLAKE2b-256 d04371c5378fc4af8ccc9fa9b281c489ec9792204b178a181a83e69319e61121

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