Documentation: https://adhtruong.github.io/dependency-injector
Source Code: https://github.com/adhtruong/dependency-injector
Framework for dependency injection.
from di import Depends, resolve
def get_my_number() -> int:
return 2
def square(my_number: int = Depends(get_my_number)) -> int:
return my_number * my_number
print(resolve(square)) # print 4
pip install -r requirements-dev.txt
pre-commit install
- Add docs
- Add async support