Skip to main content

Get PyPi Package information.

Project description

scrapypi is used to get pypi package information using python.

scrapypi can be used to get package version, name, licence, author, summary and package download statistics.

Insallation

python -m pip install scrapypi

Usage

Type scrapypi in terminal or command prompt to scrapypi file for getting downloads statistics. scrapypi can also be used in code.

$ scrapypi

Below are examples and functions and classes in scrapypi for data fetching.

  • info
  • stats
  • version

info

Get package information. You can either get information using package name or package pypi url.

from scrapypi import info, stats, licence

# returns a dictionary of information.
info(<package_name>)

values returned by info() is listed below:

  • name
  • author
  • licence
  • summary
  • previous_version
  • latest version
  • downloads

stats

Get package full statistics, including download values everyday of package upload, date and number of downloads.

from scrapypi import stats

statistics = stats(<package_name>)

# get all daily download counts of package in the year.
statistics.dataset()

# get total number of downloads.
statistics.get_total()

version

You can also get package name and version using the version function.

from scrapypi import version

# returns package name and version in a tuple. (name, version)
version(<package_name>)

Use the version function if you need to get those information fast. But i recommend using the info function.

main

The main function is to get a statics view of packages and also compare the statistics of multiple packages. Use the main() function to run the scrapypi script for statistics fetcher. Fetching multiple packages needs to be seperated with a comma (,)

Package Name(s): package_one, package_two

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

scrapypi-0.0.8.tar.gz (8.6 kB view hashes)

Uploaded Source

Built Distribution

scrapypi-0.0.8-py3-none-any.whl (9.0 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