I am excited to announce the official release of warden (pythonaibrain-warden v0.1.0)!
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.0
# Initialize a new project layout
warden init myapp
cd myapp
# Add dependencies & sync active environment
warden install requests
warden install "flask@3.0.0"
# Execute project entry point or verify reproducibility
warden run
warden verify
📋 Command Summary
| Category | Commands |
|---|---|
| Dependencies |
install • update • uninstall • lock |
| Environments |
wenv • use • fix |
| Execution |
run • run-file • exec • target |
| Quality & Audit |
verify • show • clean • cache |
| Bundles & Deploy |
build • install-wheel • backup • restore • publish |
🌐 Links & Resources
PyPI Release: pythonaibrain-warden 0.1.0
GitHub Repository: DivyanshuSinha136/Pythonaibrain-Warden
Top comments (0)