SaaSHub helps you find the best software and product alternatives Learn more →
Top 23 Python Dependency Injection Projects
-
Dependency Injector - Official Documentation
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
fastapi-clean-example
Practical Clean Architecture backend example built with FastAPI. No stateful globals (DI), low coupling (DIP), tactical DDD, CQRS, proper UoW usage. REST API, per-route error handling, session-based auth, contextual RBAC. Bundled with extensive docs and modern tooling
Project mention: Contextual error handling for FastAPI — per-route, with OpenAPI schema generation | dev.to | 2025-08-13P.S. See it powering clean architecture example app: 👉 https://github.com/ivan-borovets/fastapi-clean-example
-
FastDepends
FastDepends - FastAPI Dependency Injection system extracted from FastAPI and cleared of all HTTP logic. Async and sync modes are both supported.
-
-
-
If you find Flama useful for building robust Machine Learning and Generative AI APIs, we'd be thrilled if you showed your support by giving us a ⭐ on GitHub. Your stars are the best fuel for our development efforts!
-
-
fastapi-class
provides a class-based View decorator to help reduce the amount of boilerplate necessary when developing related routes. ✨🚀
-
-
-
Bevy
A dependency injection framework for Python! Bevy's primary goal is to help you write amazing code with less effort. (by ZechCodes)
-
magic-di
Dependency Injector with minimal boilerplate code, built-in support for FastAPI and Celery, and seamless integration to basically anything.
-
pytest-fastapi-deps
This library allows you to easily replace FastAPI dependencies in your tests. Regular mocking techniques do not work due to the inner working of FastAPI.
-
Project mention: Show HN: Engin – a modular application framework for Python | news.ycombinator.com | 2025-10-09
-
fastapi-agent-blueprint
FastAPI backend blueprint for AI agent apps: DDD, SQLAlchemy, Taskiq, admin UI, RAG infra, and Claude/Codex collaboration harness.
I open-sourced it here if anyone wants to take a look: github.com/Mr-DooSun/fastapi-blueprint
-
Project mention: Show HN: Mitsuki, a Python web framework as fast as Node or Java | news.ycombinator.com | 2025-11-30
-
Changelog: CHANGELOG.md
-
-
-
Project mention: Apywire: Lazy object wiring and dependency injection for Python 3.12 | news.ycombinator.com | 2025-12-15
This reminds me of _The Billion-Dollar Fix: Safe Modular Circular Initialisation with Placeholders and Placeholder Types_ https://dl.acm.org/doi/abs/10.1007/978-3-642-39038-8_9 https://ecs.wgtn.ac.nz/foswiki/pub/Main/TechnicalReportSerie...
Apywire reports it can't handle circular dependency: https://github.com/alganet/apywire/blob/1c9a39df36a9385d8b34...
-
-
Python Dependency Injection discussion
Python Dependency Injection related posts
-
Serving any LLM using a single command line with Flama
-
Fast dependency injection in Python without a provider framework
-
dioxide v1.1.2: Multi-Binding for Plugin Systems
-
Dependency Injection: a Python Way
-
Apywire: Lazy object wiring and dependency injection for Python 3.12
-
Show HN: Mitsuki, a Python web framework as fast as Node or Java
-
Guide to Path Variables and Query Parameters in Mitsuki Controllers
-
A note from our sponsor - SaaSHub
www.saashub.com | 22 Jun 2026
Index
What are some of the best open-source Dependency Injection projects in Python? This list will help you:
| # | Project | Stars |
|---|---|---|
| 1 | Dependency Injector | 4,882 |
| 2 | injector | 1,530 |
| 3 | fastapi-clean-example | 563 |
| 4 | FastDepends | 510 |
| 5 | kink | 441 |
| 6 | lagom | 350 |
| 7 | flama | 286 |
| 8 | flask_injector | 283 |
| 9 | fastapi-class | 119 |
| 10 | Tanjun | 90 |
| 11 | eff | 80 |
| 12 | Bevy | 71 |
| 13 | magic-di | 70 |
| 14 | pytest-fastapi-deps | 34 |
| 15 | engin | 20 |
| 16 | fastapi-agent-blueprint | 21 |
| 17 | mitsuki | 20 |
| 18 | dioxide | 16 |
| 19 | deadsimple | 12 |
| 20 | aiohttp-deps | 11 |
| 21 | apywire | 5 |
| 22 | python-rest-template | 3 |
| 23 | diay.py | 3 |