Using private repos in addition to the official PyPI
See original GitHub issue- I have searched the issues of this repo and believe that this is not a duplicate.
- I have searched the documentation and believe that my question is not covered.
I think this question has been skimmed in other issues, but not dealt with explicitly.
Question
What is the official way to source dependencies both from the public PyPI and from a private repository? I have:
[[tool.poetry.source]]
name = "pypi_"
url = "https://pypi.org/simple/"
[[tool.poetry.source]]
name = "private"
url = "https://pypi.private.com/simple/"
and it seems to work, but is there are “more official” way to say that I use the official PyPI but if a package is missing there, it should be looked up on “private”? Like pip install --index-url official_pypi --extra-index-url private ...
?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:21
- Comments:16 (4 by maintainers)
Top Results From Across the Web
Repositories | Documentation | Poetry - Python dependency ...
Repositories Poetry supports the use of PyPI and private repositories for discovery of packages as well as for publishing your projects.
Read more >PIP: Install From Private PyPi Repository - ShellHacks
How to install packages using `pip` from the private PyPi repositories. Authentication using username & password.
Read more >python - Poetry trying to install everything from private repository
Add your private pypi details in the following way. poetry config repositories.<pypiname> <url> poetry config http-basic.
Read more >Setting up a Private PyPI Server - TestDriven.io
In this tutorial, we'll look at how to set up your own private PyPI server using pypiserver, a PyPI compatible server, and Docker....
Read more >Installing Private Python Packages - Read the Docs
Pip by default will install your packages from PyPI. If you are using a repository manager like pypiserver, or Nexus Repository, you need...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please also support
extra-index-url
from command line (not pyproject.toml file).One use case is that, we need to use
peotry install
in an Alpine-based Docker container, wheremusl
lib C is used in placed ofglibc
. The wheel file built forglibc
is not always compatible withmusl
, so we setup a separate repo formusl
-based packages. This repo is only used inside Docker container, to run unit test. For production deployment, we use normalglibc
environment, that’s why we cannot add this “index URL” to pyproject.toml file (orpip
will mistakenly download package from it).If
poetry
supportsextra-index-url
parameter, we just need to modify the installer command in Docker container and things will work well.Official docs as well require http auth
poetry config http-basic
, but my private repo is read-only for me.I need one package from it, how can I achieve it? Something like this wiould be cool (same as pip -i):