Python Package Index Old API Old vs New API
May 30, 2022
HTML API
PEP:
URL:
- https://pypi.org/simple/ - base URL and the all projects relative to that
Single anchor element per repository:
<!DOCTYPE html>
<html>
<body>
<a href="/frob/">frob</a>
<a href="/spamspamspam/">spamspamspam</a>
</body>
</html>
Normalised project name:
import re
def normalize(name):
return re.sub(r"[-_.]+", "-", name).lower()
Nexus PyPI:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Simple index</title>
</head>
<body>
<a href="bag-of-bugs/">bag-of-bugs</a><br />
<a href="example-pkg-david/">example-pkg-david</a><br />
<a href="fi-ds/">fi-ds</a><br />
<a href="fi-hcd-scores/">fi-hcd-scores</a><br />
<a href="fi-pytools/">fi-pytools</a><br />
<a href="fi-rating-extract/">fi-rating-extract</a><br />
<a href="hello-thursday/">hello-thursday</a><br />
<a href="iss-proxy-voting/">iss-proxy-voting</a><br />
<a href="iss-proxy-voting-downloader/">iss-proxy-voting-downloader</a><br />
<a href="jw-file-reader-service/">jw-file-reader-service</a><br />
<a href="jw-service-common/">jw-service-common</a><br />
<a href="magic-python/">magic-python</a><br />
<a href="mc-utils/">mc-utils</a><br />
<a href="python-dojo/">python-dojo</a><br />
<a href="python-template/">python-template</a><br />
<a href="res-iss-proxy-voting-downloader/"
>res-iss-proxy-voting-downloader</a
><br />
<a href="res-msci-esg-download/">res-msci-esg-download</a><br />
<a href="res-msci-esg-download-pkg-dlp/">res-msci-esg-download-pkg-dlp</a
><br />
<a href="res-qualitative-data-service/">res-qualitative-data-service</a
><br />
<a href="res-sym/">res-sym</a><br />
<a href="rustlang-code/">rustlang-code</a><br />
</body>
</html>
JSON API
PEP: