Skip to content

v0.1.0 - Initial Release

Latest

Choose a tag to compare

@AryanKumar1401 AryanKumar1401 released this 31 Dec 17:43
· 1 commit to main since this release

πŸŽ‰ 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