Generic PubGrub dependency-resolver core
Actively maintained. Last release 6 days ago, commits in 26 of the last 26 weeks. A safe choice.
pip install nab-resolvernab-resolver
Find a combination of package versions that satisfies their dependency constraints, using the
PubGrub algorithm. A ResolverProvider supplies the package rules, so the solver needs no
Python-specific knowledge. The Python provider lives in
nab-provider and the user-facing CLI in
nab.
It has no runtime dependencies: the standard library is all it needs.
When to use it
Use nab-resolver when you are building some kind of package resolver, Python or otherwise. There
is a worked example in the docs:
https://nab.readthedocs.io/en/stable/how-to/embed-the-resolver.html
The public API
This release supports the import paths below. They can change between 0.0.x releases, so pin the version you tested.
| Module | Supported names |
|---|---|
nab_resolver.resolver | Resolver, ResolverProvider, BaseProvider, ResolverObserver, Solution, DEFAULT_MAX_ITERATIONS |
nab_resolver.root | ROOT |
nab_resolver.priority | compute_tier |
nab_resolver.ranges | Range, IntegerRangeMembership |
nab_resolver.types | RootRequirement, Term, Incompatibility, IncompatibilityCause, RangeProtocol |
nab_resolver.errors | ResolutionError, ResolutionTerminatedError, ResolutionLimitError, ResolutionInvariantError, ResolutionStalledError |
nab_resolver.diagnostics | DiagnosticMessage, Suggestion, error_message, suggestion_lines |
nab_resolver.testing |