I am excited to announce the official release of warden (pythonaibrain-warden v0.1.1)!
Python package management often forces developers to choose between low-level speed and high-level reproducibility. I built warden to bridge this gap by introducing an npm-inspired workflow centered on a deterministic lockfile architecture, native virtual environment isolation, and hard offline build guarantees.
๐ Why I Built warden
๐ Deterministic Lockfile Enforcement (
warden.lock):wardenlocks exact artifact URLs and SHA-256 hashes. Every installation executes viapip install <exact-artifact> --no-deps, preventing pip’s resolver from silently substituting different package versions.๐ Thin CLI over Core API Architecture: I designed every CLI subcommand as a light wrapper around
warden.core. Whether called from terminal scripts, unit tests, or programmatically viaimport warden.core as core, execution behavior remains identical.๐ ๏ธ Warden-Native Environments & Absolute Paths:
warden wenvconstructs standard CPython virtual environments natively. Subprocess calls resolve executables to absolute paths inside the active environment (resolve_executable), eliminating cross-platformPATHresolution bugs on Windows.๐ฏ Per-File Dependency Targets: Need to run two files with mutually exclusive package requirements in the same repository?
warden target setprovisions isolated sub-environments (.warden/venvs/target-<slug>/) and dedicated lockfiles, allowing scripts likenumpy==1.24.0andnumpy==1.26.4to live side-by-side.๐ท๏ธ Platform Wheel Selection: Artifact resolution ranks PyPI binaries against
packaging.tags.sys_tags(), preventing platform mismatch errors on C-extension wheels.๐
fixvs.installSeparation:warden fixrepairs installed-vs-locked environment drift without ever modifying project requirements inwarden.tomlorwarden.lock.๐ฆ Self-Contained Offline Bundling (
.warden.wheel):warden buildpackages project source code, manifests, locked dependencies, and build-system tools (setuptools/wheel) into zero-network archives.๐ฆ CI Reproducibility Gate (
warden verify): Runs deep validation across manifests, lockfile consistency, SHA-256 digests, and active environment states with stable non-zero exit codes on failure.
โก Quick Start
# Install warden from PyPI
pip install pythonaibrain-warden==0.1.1
# Initialize a new project layout
warden init myapp
cd myapp
# Add dependencies & sync active environment
warden install requests
warden install "[email protected]"
# Execute project entry point or verify reproducibility
warden run
warden verify
Enter fullscreen mode Exit fullscreen mode
๐ Command Summary
Category Commands Dependenciesinstall โข update โข uninstall โข lockEnvironments
wenv โข use โข fixExecution
run โข run-file โข exec โข targetQuality & Audit
verify โข show โข clean โข cacheBundles & Deploy
build โข install-wheel โข backup โข restore โข publish๐ Links & Resources
PyPI Release: pythonaibrain-warden 0.1.1
GitHub Repository: DivyanshuSinha136/Pythonaibrain-Warden