Lazy object wiring and dependency injection for Python 3.12+
- 🚀 Lazy Loading
- ⚡ Async Support
- 🔒 Thread Safety
- 📦 Code Generation
- 📄 Naturally Configurable
- 🎯 Zero Dependencies
pip install apywirefrom apywire import Wiring
spec = {
"datetime.datetime now": {"year": 2025, "month": 1, "day": 1},
"MyService service": {"start_time": "{now}"}, # Dependency injection
}
wired = Wiring(spec)
service = wired.service() # Lazy instantiation + caching📚 Full Documentation • Getting Started • API Reference • Examples
Build docs locally:
make docs-serve # http://127.0.0.1:8000make .venv && source .venv/bin/activate # Setup
make all # Format, lint, test, buildSee AGENTS.md for guidelines.
ISC License - see LICENSES/ISC.txt