Private PyPI repository

Add PyPI URL

By default, DepHell uses pypi.org as warehouse repository:

$ dephell inspect config --filter="warehouse"
[
  "https://pypi.org/pypi/"
]

You can reload it with --warehouse parameter:

$ dephell inspect config --warehouse example1.com example2.com --filter="warehouse"
[
  "example1.com",
  "example2.com"
]

You can specify it in the DepHell config:

[tool.dephell.main]
warehouse = ["example1.com", "example2.com"]

DepHell supports path to local directory with releases archives:

[tool.dephell.main]
warehouse = ["./path/to/releases"]

If you explicitly specify warehouse, DepHell drops default value and don’t use pypi.org anymore. If you want to use it after your private repository, also add it in the list:

dephell inspect config --warehouse https://example1.com/simple https://pypi.org/ --filter="warehouse"
[
  "https://example1.com/simple",
  "https://pypi.org/"
]

You can remove any repositories at all to use only specified in dependencies file:

$ dephell inspect config --warehouse --filter="warehouse"
[]

Authentication

Use dephell self auth to add credentials for host in global config:

$ dephell self auth example.com gram "p@ssword"
INFO credentials added (hostname=example.com, username=gram)

You can list stored credentials with dephell inspect auth:

$ dephell inspect auth
[
  {
    "hostname": "example.com",
    "password": "p@ssword",
    "username": "gram"
  }
]

Dependency file

Some dependency formats support explicit repository specification. These repositories always have higher priority than specified in config.

requirements.txt:

-i https://example.com/
-i https://pypi.org/simple/
...

Pipfile:

[[source]]
url = "https://example.com/"
verify_ssl = true
name = "example"

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

# ...

[packages]
deal = {index="example"}
# ^ try to find in "example" repository before all

Poetry (pyproject.toml)

# ...

[[tool.poetry.source]]
name = "example"
url = "https://example.com/"

[[tool.poetry.source]]
name = "pypi"
url = "https://pypi.org/simple"