Skip to content

v0.7.1: Added lazy provider singletons, rich logging, and stronger CI coverage

Choose a tag to compare

@pirate pirate released this 15 Mar 21:15
01d4644

Highlights

  • Added lazy provider singleton imports such as from abx_pkg import apt, brew, pip, npm, env, instantiated on first access and cached for reuse.
  • Added package-level logging helpers with opt-in Rich support via configure_logging(...), configure_rich_logging(...), and the abx-pkg[rich] extra.
  • Strengthened live lifecycle coverage and CI reliability across macOS and Linux, including better Nix/Docker setup and clearer live-test diagnostics.
  • Refreshed the README and examples around the simplified provider API and new logging configuration options.

Lazy Provider Singletons

Built-in providers are now available as explicit lazy imports:

from abx_pkg import apt, brew, pip, npm, env

This keeps common usage concise without eagerly instantiating every provider at import time. To preserve that laziness, provider singleton names are intentionally excluded from from abx_pkg import *; use explicit imports when you want the cached singleton instances.

Logging

This release adds a dedicated abx_pkg.logging module and re-exports the main helpers from abx_pkg:

  • logger and get_logger(...) for standard package-scoped logging
  • configure_logging(...) for stdlib handler setup
  • configure_rich_logging(...) for colorized terminal output when rich is installed

abx-pkg still stays quiet by default unless your application configures logging explicitly.

Validation

  • uv run pytest tests.py -q (57 passed, 11 skipped)

Full Changelog: v0.7.0...v0.7.1