Dependency injection system extracted from fastapi
import asyncio
from random import random
from dependable import dependant, Depends
@dependant
async def main(*, choice: int = Depends(random)) -> None:
print(choice)
asyncio.run(main())More on examples
poetry add dependable # pip install dependable- Backport require of async-exit-stack and async_generator
poetry add async-exit-stack async_generator # pip install async-exit-stack async_generatordocker build -t dependable .docker run --rm -v $(pwd):/usr/src/app dependable scripts/devThis project is licensed under the terms of the MIT license.