Connection
This handler is implemented using the standard Pythonrequests
library. It is used to connect to the RESTful service that pypistats.org is serving.
There are no connection arguments required to initialize the handler.
To connect to PyPI using MindsDB, the following CREATE DATABASE statement can be used:
Usage
Now, you can use the following queries to view the statistics for Python packages (MindsDB, for example): Overall downloads, including mirrors:Each table takes a required
package
argument in the WHERE clause, which is the name of the package you want to query.Supported Tables
The following tables are supported by the PyPI handler:overall
: daily download quantities for packages.recent
: recent download quantities for packages.python_major
: daily download quantities for packages, grouped by Python major version.python_minor
: daily download quantities for packages, grouped by Python minor version.system
: daily download quantities for packages, grouped by operating system.