Skip to content
GitHub

Configure Python

Route pip, uv, and Poetry package requests through Depsilo while keeping your requirements, pyproject, and install workflow.

BEFOREhttps://pypi.org/simple
AFTERhttp://localhost:23333/pypi/simple/

All three clients use the same /pypi/simple/ endpoint. Prefer project-scoped configuration. Before changing a user-level index, record its previous value so you have a clear rollback path.

~/.config/pip/pip.conf
[global]
index-url = http://localhost:23333/pypi/simple/
# Plain HTTP only:
trusted-host = localhost:23333

You can also ask pip to update its user-level configuration:

Terminal window
pip config set global.index-url http://localhost:23333/pypi/simple/
# Plain HTTP only:
pip config set global.trusted-host localhost:23333
  1. Check that the instance is ready

    Terminal window
    curl -fsS http://localhost:23333/ready
  2. Make a request without changing the environment

    Terminal window
    pip install --dry-run --ignore-installed --no-cache-dir --no-deps \
    --index-url http://localhost:23333/pypi/simple/ six
  3. Confirm the traffic in Admin

    Open Access logs (/admin/logs) in Admin and confirm the ecosystem, package name, and response status. A successful install by itself does not prove the request used Depsilo.

Override the index with CI environment variables without rewriting a requirements file. Replace the example hostname with a Depsilo address the runner can actually reach:

Terminal window
export PIP_INDEX_URL=http://depsilo.internal:23333/pypi/simple/
# Plain HTTP only:
export PIP_TRUSTED_HOST=depsilo.internal:23333
pip install -r requirements.txt

If CI runs inside a container, localhost refers to that container, not to Depsilo on the host.

No. trusted-host is an exception for plain HTTP. Remove it when Depsilo is served with a valid HTTPS certificate.

Restore the original index you recorded before configuration, then resolve or install once. Do not add a parallel public fallback as a rollback mechanism; it makes the request path unpredictable.

Which endpoint do other Python clients use?

Section titled “Which endpoint do other Python clients use?”

Pipenv and PDM also use /pypi/simple/. Select the matching client in the Portal and copy its project-scoped configuration.