WIP: Dependency resolution for Python
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
dephell
tests
.gitignore
LICENSE
README.md
pyproject.toml
requirements-flake.txt
requirements.txt
setup.cfg
setup.py
tox.ini

README.md

DepHell

Dependency resolution for Python.

Installation

sudo pip3 install dephell

CLI usage

With arguments:

python3 -m dephell convert \
    --from-format=pip --from-path=requirements.in \
    --to-format=piplock --to-path=requirements.txt

With config:

python3 -m dephell convert --config=pyproject.toml --env=main

Mix config and arguments:

python3 -m dephell convert --config=pyproject.toml \
    --to-format=piplock --to-path=requirements.txt

Available formats:

  1. pip -- pip's requirements file.
  2. piplock -- locked pip's requirements file.
  3. pipfile -- not locked Pipfile
  4. pipfilelock -- locked Pipfile

Python lib usage

from dephell import PIPConverter, Requirement

loader = PIPConverter(lock=False)
resolver = loader.load_resolver(path='requirements.in')

resolver.resolve()
reqs = Requirement.from_graph(resolver.graph, lock=True)

dumper = PIPConverter(lock=True)
dumper.dump(reqs=reqs, path='requirements.txt')

TODO

  1. Python version
  2. Hashes load
  3. Zero release (compatible with any constraints)
  4. extras
  5. right version to tag mapping for git