question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 5 years ago
  • Reactions:21
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

10reactions
hongquancommented, Apr 23, 2019

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, where musl lib C is used in placed of glibc. The wheel file built for glibc is not always compatible with musl, so we setup a separate repo for musl-based packages. This repo is only used inside Docker container, to run unit test. For production deployment, we use normal glibc environment, that’s why we cannot add this “index URL” to pyproject.toml file (or pip will mistakenly download package from it).

If poetry supports extra-index-url parameter, we just need to modify the installer command in Docker container and things will work well.

6reactions
Yanpascommented, May 13, 2019

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):

packagename = 1.0 {repo=myprivaterepo.com}
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found