{"library":"poetry-plugin-pypi-mirror","title":"Poetry PyPI Mirror Plugin","description":"Poetry plugin that adds support for pypi.org mirrors and pull-through caches. It enables Poetry to substitute connections to pypi.org with connections to a mirror or pull-through cache without requiring project configuration changes. This design prevents source entries for the mirror from appearing in `poetry.lock`. The current version is 0.6.3 and it is actively maintained.","language":"python","status":"active","last_verified":"Sat Apr 11","install":{"commands":["pip install poetry-plugin-pypi-mirror"],"cli":null},"imports":[],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# 1. Install the plugin (if not already installed)\n# poetry self add poetry-plugin-pypi-mirror\n\n# 2. Configure the PyPI mirror URL\n# Option A: Environment Variable (takes precedence)\nimport os\nimport subprocess\n\nmirror_url = os.environ.get('POETRY_PYPI_MIRROR_URL', 'https://your-private-mirror.org/simple/')\n\n# Example using the environment variable directly with a poetry command\nprint(f\"Using mirror: {mirror_url}\")\nsubprocess.run([\n    'poetry',\n    '--version'\n]) # Replace with actual poetry command using the mirror\n\n# Option B: Poetry config (global or project-specific)\n# To set globally:\n# poetry config plugins.pypi_mirror.url https://your-private-mirror.org/simple/\n# To set for a project (in pyproject.toml):\n# [plugins.pypi_mirror]\n# url = \"https://your-private-mirror.org/simple/\"\n\n# 3. Add a dependency, which will use the configured mirror for PyPI\n# poetry add requests","lang":"python","description":"Install the plugin using `poetry self add`. Then, configure your PyPI mirror URL either via the `POETRY_PYPI_MIRROR_URL` environment variable or by setting `plugins.pypi_mirror.url` in your Poetry configuration (global or project-specific). The environment variable takes precedence. Once configured, Poetry commands that interact with PyPI (like `poetry add` or `poetry install`) will automatically use the mirror. If authentication is required, configure it for the 'PyPI' repository using `poetry config http-basic.PyPI <username> <password>`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}