Example Requests Served by Repositories

R

PACKAGES file

http://packagemanager.example.com/repo/latest/src/contrib/PACKAGES

This serves a PACKAGES file. The PACKAGES file for a repository is human-readable and contains information on each package available in the repository. Package Manager can also serve requests for PACKAGES.gz and PACKAGES.rds.

Package Source

http://packagemanager.example.com/repo/latest/src/contrib/package_2.1.0.tar.gz

This request downloads the package source to the client.

Archived Package Source

http://packagemanager.example.com/repo/latest/src/contrib/archive/package/package_1.1.0.tar.gz

This request downloads the tar file for an older, archived version of the package.

Bioconductor

Bioconductor Package Source

http://packagemanager.example.com/repo/packages/3.11/bioc/src/contrib/package_2.1.0.tar.gz

This request downloads the Bioconductor package source to the BiocManager client.

PyPI

Simple page

http://packagemanager.example.com/repo/latest/simple/PACKAGE

The simple page serves the PyPI Simple Repository API, and is compliant with PEP 503 (HTML), PEP 592 (yanked releases), PEP 629 (API version declaration), PEP 691 (JSON), and PEP 700 (per-file size and upload time, and project version lists).

Package Manager chooses the response format from the request’s Accept header. A client asking for application/vnd.pypi.simple.v1+json receives JSON. Anything else, including a browser or a request with no Accept header, receives HTML. pip, uv, and Poetry request JSON by default, so you do not need to configure anything. An unrecognized media type falls back to HTML rather than returning an error.

The optional format query parameter overrides the Accept header:

http://packagemanager.example.com/repo/latest/simple/PACKAGE?format=application/vnd.pypi.simple.v1+json
ImportantCaching proxies must key on Accept

One simple-page URL returns two different bodies depending on the request. Package Manager marks these responses Vary: Accept, Accept-Encoding to say so, and by default sends Cache-Control: max-age=3600, which you can change with Server.HTTPCacheControl.

If you run a caching proxy, CDN, or caching artifact manager such as Artifactory or Nexus in front of Package Manager, confirm that it includes Accept in its cache key. Some caches ignore Vary and key on the URL alone. Such a cache stores whichever format it sees first, then serves that body to every client for the lifetime of that Cache-Control value. A pip or uv client can then receive HTML where it expects JSON, or the reverse.

nginx and Squid honor Vary and need no change. CDNs are the common source of this problem: many default cache policies exclude request headers, so Accept must be added to the cache key explicitly.

Clients report this as no matching distribution found, which looks like a missing package rather than a caching problem.

The format query parameter does not work around this for installers. A client derives each project URL from the index URL it was given, and the query string does not survive that step: pip appends the project name after the query, and uv drops the query entirely. Use format for a hand-built request, such as a curl command that reproduces what a client receives, rather than as a cache workaround.

Package Manager does not serve package metadata files (PEP 658). Each file in a JSON response reports "core-metadata": false, which tells a client definitively that no metadata file is available. Omitting the field would instead mean the file “may or may not exist”, leaving the client to discover that by requesting a URL that does not resolve.

PyPI Package Source

http://packagemanager.example.com/repo/latest/packages/ID/PACKAGE#sha256=SHA256

This request downloads the PyPI package source to client. Links to these files can be found by visiting a package’s simple page.

Back to top