Skip to main content

PyPI Repositories

The Python Package Index (PyPI) is a repository of open-source Python packages maintained by the Python Software Foundation. See PyPI.

Sonatype Nexus Repository supports proxying PyPi packages and publishing packages to a private index. Use Nexus group repository to expose multiple repositories (proxy, hosted and group) with a single URL.

Before you begin, Install Python and pip. Recent CentOS and Ubuntu distributions commonly include both tools. On macOS and Windows, install a compatible Python release that includes pip. Nexus Repository supports the latest Python 2 and 3 releases and the latest two pip versions.

Getting Started with PyPI in Nexus

Explore the following topics to learn how to configure and use PyPI with Nexus.

Nexus for PyPI

  • Proxy Repository: Centralize access to public Python packages and cache remote artifacts from PyPI.

  • Hosted Repository: Publish and store internal PyPI packages in Nexus Repository.

  • Group Repository: Combine proxy, hosted, and other group repositories and expose them through one URL.

  • PEP 503: Simple Repository API. Nexus Repository fully supports the standard HTML-based API for Python Package indexes, including project and package file listings.

  • New in 3.93 PEP 658: Serve distribution metadata in the Simple Repository API. Nexus Repository fully supports serving package metadata separately from the distribution file. This allows you to retrieve core package metadata without downloading the full artifact.

  • New in 3.93 PEP 691: JSON-based Simple API. Nexus Repository fully supports the JSON representation of the Simple API, including content negotiation so you can request JSON responses when supported. This support is available from version 3.93 for self-hosted deployments.

  • New in 3.94 PEP 700 Additional fields for the JSON Simple API. Nexus Repository supports Simple API v1.1 JSON responses with package version, file size, and upload time metadata.

  • PEP 714: Rename dist-info-metadata in the Simple API. Nexus Repository fully supports the updated metadata field names introduced by PEP 714, including data-core-metadata in HTML responses and core-metadata in JSON responses.

  • Supports usage of PyPI client tools such as pip, Poetry, uv and twine across proxy, hosted, and group repositories.

  • Supports .tar.gz extension.