PyPI JSON API: Tools for querying Python package metadata, release information, and statistics from the Python Package Index
Version: v0.2.2
Install: /plugin install pypi-json@mearman
Retrieve comprehensive metadata for Python packages from the Python Package Index (PyPI).
npx tsx scripts/info.ts <package-name> [options]| Argument | Required | Description |
|---|---|---|
package-name |
Yes | The exact package name (case-insensitive) |
| Option | Description |
|---|---|
--no-cache |
Bypass cache and fetch fresh data from PyPI |
--releases |
Show detailed release history and file information |
--files |
Show distribution files for the latest release |
django
==================================================
Latest Version: 5.0.1
License: BSD
Author: Django Software Foundation
Summary:
A high-level Python web framework that encourages rapid development and clean,
pragmatic design.
Project URLs:
Documentation: https://docs.djangoproject.com/
Repository: https://github.com/django/django
Bug Tracker: https://code.djangoproject.com/
Python Requirement: >=3.10
Dependencies (latest):
- asgiref >=3.6.0,<4
- sqlparse >=0.2.2
Run from the pypi-json plugin directory: ~/.claude/plugins/cache/pypi-json/
GET https://pypi.org/pypi/{package}/json
| Parameter | Required | Description |
|---|---|---|
package |
Yes | The exact package name (case-insensitive on PyPI) |
format |
No | Always use json for structured data |
| Status | Meaning |
|---|---|
200 OK |
Package found and metadata returned |
404 Not Found |
Package does not exist on PyPI |
The API returns comprehensive package information structured in these main sections:
info- Package metadata objectname- Package nameversion- Latest version numbersummary- Short descriptiondescription- Full descriptionlicense- License identifierauthor- Package author nameauthor_email- Author contact emailmaintainer- Current maintainermaintainer_email- Maintainer emailhome_page- Project homepage URLproject_urls- Dictionary of project-related URLs (documentation, repository, bug tracker, etc.)keywords- Space-separated keywordsclassifiers- List of PyPI classifiers (topic, audience, license, etc.)requires_python- Required Python version(s) as version specifier
releases- Object mapping version strings to arrays of distribution files- Each release contains file info: filename, URL, MD5, SHA256, size, file type
- Includes both wheel (.whl) and source (.tar.gz) distributions
- File type indicators:
bdist_wheel,sdist
urls- Array of distribution files for the latest versionfilename- Distribution file nameurl- Direct download URLhashes- Dict of hash algorithms and valuesrequires_python- Python version requirementyanked- Whether this release is yanked (deprecated)upload_time_iso_8601- Publication timestamp
django
==================================================
Latest Version: 5.0.1
License: BSD
Author: Django Software Foundation
Summary:
A high-level Python web framework that encourages rapid development and clean,
pragmatic design.
Project URLs:
Documentation: https://docs.djangoproject.com/
Repository: https://github.com/django/django
Bug Tracker: https://code.djangoproject.com/
Python Requirement: >=3.10
Classifiers:
- Development Status :: 5 - Production/Stable
- Environment :: Web Environment
- Framework :: Django :: 5.0
... (and more)
Latest Release Files (with --files flag):
Django-5.0.1-py3-none-any.whl [wheel] - 8.2 MB
Django-5.0.1.tar.gz [source (tar.gz)] - 9.1 MB
Get package metadata:
https://pypi.org/pypi/requests/json
Get specific version:
https://pypi.org/pypi/requests/2.31.0/json
- Package Discovery: Find package descriptions, authors, and project URLs
- Dependency Analysis: Check Python version requirements and release history
- Version Information: Identify stable releases vs pre-release versions
- License Verification: Determine package licensing and compliance
- Availability Check: Verify if a package exists on PyPI
Package metadata is cached for 6 hours. Use the --no-cache flag to bypass the cache.
For more information, see:
Package not found: If the package doesn't exist on PyPI, the API returns a 404 status code.
Network errors: Connection timeouts or unreachable hosts. Use --no-cache to retry from PyPI.
Invalid package name: PyPI is case-insensitive for package names. The API normalizes names by:
- Converting to lowercase
- Treating hyphens (
-), underscores (_), and dots (.) as equivalent - Examples:
my-package,my_package,my.packageall refer to the same package