Skip to content

Releases: AryanKumar1401/importguard

v0.1.0 - Initial Release

31 Dec 17:43

Choose a tag to compare

🎉 importguard v0.1.0 - Initial Release

Measure and enforce import-time behavior in Python projects.

Features

  • ⏱️ Import timing — Measure how long import mypkg takes using Python's -X importtime
  • 💰 Time budgets — Fail CI if imports exceed a threshold (--max-ms 200)
  • 🚫 Banned imports — Block heavy dependencies from your fast path (--ban pandas)
  • 🔁 Reliable measurements — Run multiple times and report median (--repeat 5)
  • 📄 Config files — Define rules in .importguard.toml
  • 🐍 Python API — Use check_import() programmatically
  • 📊 JSON output — Machine-readable results for CI integration

Installation

pip install importguardpy## Quick Start

Check import time

importguard check requests

Enforce a budget

importguard check mypkg --max-ms 200

Ban heavy imports

importguard check mypkg.cli --ban pandas --ban torch## Links