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:
In the Administration module under Repositories | Repositories | Remote, and click New Remote Repository.
Set the Package Type to PyPI and enter the Repository Key value.
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/.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 athttps://<YOUR-JFROG-URL>/artifactory/
, you would set the Registry URL tohttps://<YOUR-JFROG-URL>/artifactory/api/pypi/python-project
as shown below:PyPI remote repository URL
You should not include
/simple
in the PyPI remote repository URL. This suffix is 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
.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