Set Up Remote PyPI Repositories

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

A remote repository defined in Artifactory serves as a caching proxy for a registry managed at a remote URL such as https://pypi.org/.

Artifacts (such as .whl files) requested from a remote repository are cached on demand. You can remove downloaded artifacts from the remote repository cache, however you can not manually deploy artifacts to a remote PyPI repository.

To create a repository to proxy a remote PyPI repository follow the steps below:

  1. In the Administration module under Repositories | Repositories | Remote, and click New Remote Repository.

  2. Set the Package Type to PyPI and enter the Repository Key value.

  3. The URL and Registry URL settings depend on whether you are proxying the public external PyPI repository, or a PyPI repository hosted on another Artifactory server.

    For a public, external PyPI repository: Change the URL field to https://files.pythonhosted.org/ , and set the Registry URL field to https://pypi.org/.

    pypi_remote.jpg

    For a PyPI repository hosted on another Artifactory instance: Set the remote repository's PyPI API URL in the Registry URL field. For example, to proxy a PyPI repository called " python-project " hosted by an Artifactory instance at https://[jfrogPlatformURL]/artifactory/ , you would set the Registry URL to https://[jfrogPlatformURL]/artifactory/api/pypi/python-project as shown below:

    repo-url.png

    PyPI remote repository URL

    You should not include api/pypi or /simple in the PyPI remote repository URL. These suffixes are added by Artifactory when accessing the remote repository.

    If you use a custom PyPI remote repository, you need to make sure it has a simple index (directory listing style) accessible by <URL>/simple .

  4. Click Save & Finish.

    Remote Artifactory

    If the remote repository is also managed by an Artifactory server, then you need to point to its PyPI API URL in the Registry URL field. For example, http://my.remote.artifactory/artifactory/api/pypi/python-project