GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • PyPI.org
  • PyPI blog
  • User documentation
  • Developer documentation
  • GitHub
  • PyPI Basics
  • Finding and Installing Packages
  • Introduction
  • Assessing Source Code Security
  • Checking Provenance (package origin)
  • Verifying Package Integrity
  • Common Security Attacks
  • Reporting Security Issues
  • Troubleshooting

This view

  • Original page
  • New address

GeezerVison is showing docs.pypi.org — Stats API - PyPI User Documentation

Stats API¶

Important

You must set Accept: application/json in your requests to this API. Without the Accept header, you will be returned an HTML page.

Tip

An example stats API client can be found at cooperlees/pypistats.

Routes¶

Project stats¶

Route: GET /stats/

Returns statistics in JSON format. This includes:

  • Total size of PyPI packages in bytes
  • Top 100 packages + their size in bytes

Status codes:

  • 200 OK - no error

Example request:

GET /stats HTTP/1.1
Host: pypi.org
Accept: application/json
Example JSON response
{
  "top_packages": {
    "CodeIntel": {
      "size": 23767329521
    },
    "Fiona": {
      "size": 6209535709
    },
    "FlexGet": {
      "size": 4387002448
    },
    "...": "..."
  },
  "total_packages_size": 23965450269
}
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.