Skip to main content

nab-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 ProviderScenario, ProviderConformanceError, check_provider, check_provider_scenarios

Import the names you need from their modules. Importing nab_resolver alone loads no submodules. Other module paths are internal and may change in any release.

Checking preferred versions

try_resolve_preferred checks a proposed assignment against the current provider's version choices, dependencies and emitted incompatibilities. It returns the reachable pins on success, or None when ordinary resolution is needed. Pass allow_new=True to let the provider choose versions for packages absent from the proposed assignment.

Requirements or constraints can force a different version from the preference. If the preferred version remains in range but the provider chooses another, the trial refuses and leaves the choice to ordinary search.

trial = Resolver(make_provider())
pins = trial.try_resolve_preferred(requirements, preferred, constraints)
if pins is None:
    pins = Resolver(make_provider()).resolve(requirements, constraints)

The trial consumes its resolver and provider. Create both again before falling back; provider callbacks may have queued facts during the trial. Nab's project layer owns these attempts for each target and retains package names and alignment preferences between targets.

Metadata

Release files for nab-resolver 0.0.32

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nab-resolver 0.0.32
File Size Uploaded Provenance Actions
nab_resolver-0.0.32.tar.gz 189.7 kB With provenance Details for nab_resolver-0.0.32.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nab-resolver 0.0.32
File Interpreter ABI Platform Actions
nab_resolver-0.0.32-py3-none-any.whl Python 3 none any Details for nab_resolver-0.0.32-py3-none-any.whl

Total release size: 262.7 kB

Release files / nab_resolver-0.0.32.tar.gz

Download URL nab_resolver-0.0.32.tar.gz
Size 189.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9384c343a456ab4ff19762f1d7c012c99dbf9c37be9e56493f871cfe5b30910a
BLAKE2b-256 checksum
How to use checksums
e2a85d0f875c9de58fec5932c35251378de9b37bbca8c7f22e3a55f0d8188a8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Release files / nab_resolver-0.0.32-py3-none-any.whl

Download URL nab_resolver-0.0.32-py3-none-any.whl
Size 73.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff50ac51c23a03eeaed050f7624c8caff90640fd61aed8e722a83fb3b650cf74
BLAKE2b-256 checksum
How to use checksums
9e91877103795457717b4837e2df46389f369ec75074606fba5e8b53db2ed159
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

Security for nab-resolver 0.0.32

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nab_resolver-0.0.32.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.32 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page