skillfed

nab-resolver

Generic PubGrub dependency-resolver core

nab-resolver v0.0.14 422.3K downloads/30d#6,783 on PyPI24
Permissive license MIT Active released

What it is and what it does

nab-resolver is a generic dependency-resolution engine built on PubGrub algorithms. It provides the core constraint-solving logic without any Python-specific knowledge, making it suitable for embedding in resolvers for any package ecosystem. The package exports a ResolverProvider protocol and a Resolver class that callers parameterize with their own domain logic—defining how to fetch versions, check compatibility, and report requirements.

It is intended as a library for developers building package resolvers, not as a standalone tool. The Python-specific provider lives in nab-provider, and the user-facing CLI is in nab. The resolver itself is a SAT-style solver core: you supply it with a protocol implementation, and it returns a solution or raises ResolutionError. It has no runtime dependencies beyond the standard library.

Use it for:

  • Embed the resolver in a custom package manager for a non-Python ecosystem.
  • Build a dependency resolver for a domain-specific package format or language.
  • Implement version constraint solving in a build tool or deployment system.
  • Test or prototype dependency-resolution algorithms without writing a full resolver from scratch.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A generic PubGrub-style dependency resolver core that accepts a ResolverProvider protocol, with no Python-specific logic—designed for embedding in package resolvers or other systems that need SAT-style constraint solving.

Yes, if you are building a package resolver or constraint-satisfaction system. The low install friction, zero runtime dependencies, active maintenance, and permissive license make it a solid foundation. Not relevant for end users of Python packages—use nab or nab-provider instead.

Install

nab-resolver on PyPI

pip

pip install nab-resolver

uv

uv add nab-resolver

poetry

poetry add nab-resolver

Installing nab-resolver

Before you install

Low friction: pure Python, no runtime dependencies, and actively maintained with a recent release. Supports Python 3.10 through 3.14.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal attribution requirements.

Quickstart

from nab_resolver.resolver import Resolver, ResolverProvider
from nab_resolver.types import Term, Incompatibility

# Implement ResolverProvider with your domain logic
class MyProvider(ResolverProvider):
    def choose_package_version(self, term): ...
    def get_incompatibilities(self, term): ...

resolver = Resolver(MyProvider())
solution = resolver.resolve(root_term)

Requires Python 3.10 or later. Caller must implement the ResolverProvider protocol with domain-specific logic.

Verify before relying

  • Whether the resolver handles cyclic dependencies or other edge cases beyond what the public API documentation implies.
  • Performance characteristics and scalability limits for large dependency graphs.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 0 days since the last release
Last repo commit
First released
Downloads 422,340/month — #6,783 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: nab_resolver-0.0.14-py3-none-any.whl

Development Status :: 4 - BetaProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed

Tags

dependency resolver librarypubgrub implementationconstraint satisfaction solverpackage resolution enginesat solver for dependenciesembeddable resolver coreversion constraint solver
resolver-corepubgrubconstraint-solver

More Build Tools packages