feat: add PyPI remote type with URL rewriting and basic auth #15
Reference in New Issue
Block a user
Delete Branch "benvin/pypi-remote"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
pypipackage type withsimple/paths treated as mutable (index pages expire, package files cached forever)files.pythonhosted.orgURLs in simple index HTML responses so package downloads also go through the proxy — configured viapypi_files_url/pypi_files_remoteper-remote, making it work for both PyPI and self-hosted registries (Gitea, Devpi, etc.)username/passwordin remote config), threaded through upstream reachability and conditional HEAD checks.whlcontent-type (application/zip) and refactors the duplicated content-type block into a shared helperpypiandpypi-filesremotes toremotes.yaml, plus apypi-giteaexample for Gitea package registries where index and files share the same base URLTest plan
uv run pytest)uv run --with pre-commit --default-index http://localhost:8000/api/v1/remote/pypi/simple pre-commit --versionwith a freshUV_CACHE_DIRfetches all packages through the proxy (cache misses logged)UV_CACHE_DIRserves everything from proxy cache (cache hits logged, no upstream fetches)files.pythonhosted.orghrefs rewritten to the localpypi-filesremote path