abxpkg
System package manager interfaces with Python type hints
What it is and what it does
abxpkg is a Python library and CLI that abstracts away the differences between multiple package managers, letting you install and manage binaries and dependencies at runtime without hardcoding which package manager to use. Instead of writing separate logic for apt, brew, pip, npm, docker, and others, you define a Binary with a list of providers to try in order—the library handles detection, installation, versioning, and execution across all of them.
It's designed for applications that need to fetch and run external tools dynamically: ArchiveBox uses it to install chrome, wget, and other extractors on macOS, Linux, and Docker. You can bake dependency installation into your app, use it as a CLI tool to manage binaries in a dedicated cache directory, or integrate it into Django projects to build UIs and APIs around package management. The library defaults to safe behavior (7-day minimum release age, no post-install scripts) and isolates installed packages to avoid polluting the host system.
Use it for:
- Detect and auto-install external tools (chrome, ffmpeg, yt-dlp) at runtime without requiring users to install them manually.
- Build a CLI tool that works across macOS, Linux, and Docker by abstracting away platform-specific package managers.
- Serialize and persist dependency metadata to a database or config file for reproducible deployments.
- Search package indexes across multiple managers to find the best available version of a binary.
- Integrate package management into a Django application to provide a UI or API for managing system dependencies.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Unified interface for detecting, installing, and managing binary and source dependencies across multiple package managers (apt, brew, pip, npm, docker, cargo, and others) from Python code or CLI.
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and solves a real problem for applications that need to manage cross-platform runtime dependencies. It's most valuable if you're building tools that must work across multiple operating systems or package ecosystems; less critical for single-platform projects with static dependencies.
Install
abxpkg on PyPI
pip
pip install abxpkguv
uv add abxpkgpoetry
poetry add abxpkgInstalling abxpkg
Before you install
Low friction: pure Python wheel with four lightweight runtime dependencies (platformdirs, pydantic, rich-click, typing-extensions). Active maintenance with a release on 2026-08-14.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for both open-source and commercial projects.
Quickstart
pip install abxpkg
from abxpkg import Binary, env, npm, brew
prettier = env.load('prettier') or npm.install('prettier') or brew.install('prettier')
# or:
prettier = Binary(name='prettier', binproviders=[env, npm, brew]).install()
print(prettier.abspath, prettier.version)
Requires Python 3.12 or later (3.12, 3.13, or 3.14). Actual package installation depends on target package managers being available on the host system.
Verify before relying
- Whether the library can reliably detect and install binaries across all listed package managers in mixed environments.
- Performance characteristics when searching large package indexes or installing many dependencies in parallel.
- Extent of Django integration (classifiers list Django 4.0–6.0 but description mentions optional django-ninja/django-jsonform usage).
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<3.15,>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — platformdirs, pydantic, rich-click, typing-extensions |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 182,562/month — #10,094 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: abxpkg-1.12.72-py3-none-any.whl
Keywords: ansible, apt, brew, cargo, dependencies, devops, docker, gem, nix, packagemanager, pip, pydantic, pyinfra, system
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
abx-dlA CLI tool that auto-detects and downloads…
permissive · top 15,000 on PyPI
nab-pythonProvides Python package index integration for…
permissive · top 15,000 on PyPI
abx-pluginsProvides a suite of ArchiveBox-compatible…
permissive · top 15,000 on PyPI
abxbusAn in-memory event bus for async Python that…
permissive · top 15,000 on PyPI
pipxpipx installs and runs Python command-line…
permissive · top 5,000 on PyPI
chromedriver-pyDownloads and installs the appropriate…
permissive · top 15,000 on PyPI
pip-autoremoveA command-line tool that uninstalls a package…
permissive · top 15,000 on PyPI
sail-sdksail-sdk is a deprecated compatibility shim…
unclear · top 15,000 on PyPI
detect-installerDetects which package manager installed a given…
permissive · top 5,000 on PyPI
pkgconfpkgconf is a cross-platform Python package that…
permissive · top 15,000 on PyPI