Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 1.38 KB

File metadata and controls

63 lines (43 loc) · 1.38 KB

apywire

Python 3.12+ License: ISC

Lazy object wiring and dependency injection for Python 3.12+

Features

  • 🚀 Lazy Loading
  • ⚡ Async Support
  • 🔒 Thread Safety
  • 📦 Code Generation
  • 📄 Naturally Configurable
  • 🎯 Zero Dependencies

Installation

pip install apywire

Quick Example

from 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

Documentation

📚 Full DocumentationGetting StartedAPI ReferenceExamples

Build docs locally:

make docs-serve  # http://127.0.0.1:8000

Development

make .venv && source .venv/bin/activate  # Setup
make all                                  # Format, lint, test, build

See AGENTS.md for guidelines.

License

ISC License - see LICENSES/ISC.txt