ARTIFACTORY: How to deploy a PyPI package to the Artifactory’s local repository?

Yuvarajan Johnpaul
2022-05-01 12:05

This article describes the steps to configure your Python client to publish packages to the JFrog Artifactory's PyPI repository.

What's needed for a Python package to be published?


First, you need to add Artifactory as an index server for your user. This can be done through the $HOME/.pypirc file configured at the client-side.

To configure the .pypirc file with the Artifactory's repository information, please refer to the Set Me UP section available with the PyPI repositories you have created in Artifactory.

User-added image

Upon clicking on the "Set Me Up" option, it will display the instructions to update the .pypirc file.

User-added image


a file (which includes the package information), For more details on how to prepare a file, please refer to the article here.

Here’s a sample setup file for referenceimport setuptools
author="Yuvarajan Johnpaul",
description="Package for testing uploads [PyPI]",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",

Once the and the $HOME/.pypirc files are ready, execute the following command to upload the package to the local repository.$ python sdist upload -r local