PipMaster: Python Package Toolkit

pipmaster Logo

Programmatic Package Management for Python

Tired of scripting complex ``subprocess`` calls to manage Python packages?

pipmaster provides a clean, robust, and feature-rich Python API to interact with package managers like pip. It allows you to seamlessly install, update, check, uninstall, and manage dependencies programmatically, both within the current environment and specifically targeting other Python virtual environments.

Whether you’re building application setup routines, automating testing environments, managing plugins, or creating development tools, pipmaster simplifies your package management workflows.

Key Features:

  • Programmatic Control: A clear Python interface for pip operations.

  • 🚀 `uv` Backend Support: Leverage the high-speed uv installer for creating environments and managing packages.

  • 🎯 Environment Targeting: Manage packages in any specified Python environment, with automatic venv creation.

  • 🔄 Idempotent Management: Use ensure_packages and ensure_requirements to declare the desired state, and let pipmaster handle the rest efficiently.

  • 🔍 Conditional Logic: Install packages only if missing or if version requirements aren’t met (install_if_missing()), with advanced support for conditional VCS installs.

  • ⚙️ Status Checks: Reliably check if packages are installed (is_installed()), get versions (get_installed_version()), and verify version compatibility (is_version_compatible()).

  • 🛡️ Vulnerability Scanning: Integrate pip-audit checks into your workflows (check_vulnerabilities()).

  • Asynchronous API: Non-blocking operations for async applications (pipmaster.async_package_manager).

  • 🧪 Dry Run Mode: Simulate commands without making changes to the environment.

  • 🧩 Extensible: Designed with future support for other backends (like conda) in mind.

Core Use Cases:

  • Application Bootstrapping: Ensure necessary dependencies are present when your application starts.

  • Automated Testing: Set up specific package versions in test environments.

  • Plugin Systems: Dynamically install required packages for plugins.

  • Development Tooling: Build scripts that manage project dependencies.

  • CI/CD Pipelines: Integrate programmatic package management into your build and deployment processes.

Quick Links:

Ready to simplify your package management?

Explore the details:

User Guide

Full API details:

Project Information:

Project Info

Indices and Tables