Internet Explorer is no longer supported. Many things will still work, but your experience will be degraded and some things won't function. Please use a modern browser such as Edge, Chrome, or Firefox.

Integrating PipEnv or Poetry with ProGet

view on GitHub

When managing Python packages, pip is a common tool of choice. However, you can also use tools like PipEnv or Poetry when working with your PyPI feeds in ProGet. This page covers how to configure and integrate these two tools with you PyPI feeds as a source and authenticate to them.

This page covers PipEnv and Poetry specific configuration. You can read our other documentation to learn more about proxying OSS PyPI packages from your PyPI feed and publishing packages to them.

Using Your PyPI Feed as a Source to Install Packages

In PipEnv

To configure Pipenv to use your PyPI feed, set the PIP_INDEX_URL environment variable in your shell before running pipenv install, or include it in your Pipfile:

$ export PIP_INDEX_URL=https://«proget-server»/pypi/«feed-name»/simple

Alternatively, modify your Pipfile to include:

[[source]]
name = "«feed-name»"
url = "https://«proget-server»/pypi/«feed-name»/simple"
verify_ssl = true

Then install packages with:

$ pipenv install «package-name»==«package-version»

In Poetry

To configure Poetry to use your PyPI feed, you can add the repository to your project using the poetry config command:

$ poetry config repositories.«feed-name» https://«proget-server»/pypi/«feed-name»/simple

Then, to install a package from your feed, use the poetry add command:

poetry add «package-name» --source «feed-name»

Authenticating to your PyPI Feed

If you've configured your feed to require authentication, you can use either PipEnv or Poetry to authenticate to it.

Using PipEnv

To use your feed with Pipenv, you can set the PIP_INDEX_URL environment variable with the authenticated URL:

$ export PIP_INDEX_URL=https://api:«api-key»@«proget-server»/pypi/«feed-name»/simple

Then, install packages with Pipenv:

$ pipenv install «package-name»==«package-version»

Using Poetry

To configure Poetry to authenticate with your PyPI feed, add the repository and credentials to your Poetry configuration:

$ poetry config repositories.pypy-feed https://«proget-server»/pypi/«feed-name»/simple
$ poetry config http-basic.pypy-feed api «api-key»

Once configured, you can install packages using:

$ poetry add «package-name» --source pypy-feed