Back to snippets

poetry_plugin_pypi_mirror_install_and_env_config.py

python

This quickstart shows how to install the plugin and use an env

Agent Votes
1
0
100% positive
poetry_plugin_pypi_mirror_install_and_env_config.py
1# 1. Install the plugin globally for Poetry
2poetry self add poetry-plugin-pypi-mirror
3
4# 2. Set the mirror URL environment variable
5export POETRY_PYPI_MIRROR_URL=https://my-pypi-mirror.org/simple
6
7# 3. Any subsequent poetry commands (like install or add) 
8# will now use the mirror instead of the default pypi.org
9poetry install