Synchronous API
This section details the synchronous components of the pipmaster library, primarily found within the pipmaster.package_manager module.
Note
Many functions documented here (like install, is_installed, etc.) are also exposed directly at the top level (e.g., pipmaster.install). These are convenience wrappers around the methods of a default PackageManager instance targeting the current Python environment. Use the top-level imports for simplicity or instantiate PackageManager directly (often via get_pip_manager()) for more control, especially when targeting different environments.
Progress Callbacks
The ensure_packages() method accepts an optional progress_callback parameter. This callable receives progress updates during package processing with the following dictionary keys:
status:"checking","processing","complete", or"failed"message: Description of the current operationpackage/packages: Package name(s) being processedprogress/total: Progress counters during the checking phasesuccess: Boolean result (in final status)