Create a PyPI Smart Remote Repository

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide

The procedure for creating a Smart Remote repository for PyPI involves an additional step, as described below.

To create a PyPI Smart Remote repository:

  1. On the first Artifactory instance (JFROG_INSTANCE_1), do the following:

    1. In the Administration module, go to Repositories > Create a Repository > Remote.

    2. Choose PyPI as the package type.

    3. In the Basic tab, enter a repository key. The following default settings for PyPI are predefined:

      • The URL is set to https://files.pythonhosted.org.

      • The Registry URL is set to https://pypi.org.

    4. Enter additional basic and advanced settings as required, and then click Create Remote Repository.

    You now have a remote repository that points to the official PyPI upstream registry.

  2. On the second Artifactory instance, set up a Smart Remote repository that proxies the first repository:

    1. Create a remote PyPI repository, as described above.

    2. Enter a repository key and enter additional settings as required.

    3. Modify the URL and Registry URL fields as follows:

      • URL: https://<JFROG_INSTANCE_1_URL>/artifactory/<REPO_KEY_IN_JFROG_INSTANCE_1>

      • Registry URL: https://<JFROG_INSTANCE_1_URL>/artifactory/api/pypi/<REPO_KEY_IN_JFROG_INSTANCE_1>

      Important

      <REPO_KEY_IN_JFROG_INSTANCE_1> refers to the name of the PyPI remote repository you created on the first Artifactory instance (<JFROG_INSTANCE_1>) in step 1.

    4. Enter your username and password for JFROG_INSTANCE_1. Alternatively, enter a valid access token issued by JFROG_INSTANCE_1.

    5. Click the Test button to verify the connection to the first Artifactory instance.

    pypi-smart-remote-setup.png
  3. To configure your PyPI client with the newly created Smart Remote repository, see Connect Your PyPI Client to Artifactory.