When building FastAPI endpoints, I found the dependency injection system such a pleasure to use that I wanted it everywhere, not just in my endpoints. I explored a few libraries that promised similar functionality, but each had drawbacks, some required Pydantic, others bundled in features beyond dependency injection, and many were riddled with bugs.
That's way I created PyDepends, a lightweight dependency injection system that I now use in my own projects and would like to share with you.
It does just that, inject dependencies, nothing more. No type checking, no automatic casting or pydantic requirements. Sync and async mode, all implemented in a single file.