awesome-dependency-injection-in-python
A curated list of awesome things related to dependency inversion / dependency injection in Python. (Contributions welcomed).
https://github.com/sfermigier/awesome-dependency-injection-in-python
Last synced: 21 days ago
JSON representation
Articles / blog posts
- Enforcing Single Responsibility Principle in Python
- Pythonic Dependency Injection: A Practical Guide
- Elegant Flask API Development Part 1 - Injector).
- Typed Functional Dependency Injection in Python
- Tests and comparison of Python dependency injection libraries - Tests and comparison of Python dependency injection libraries. [π, Unknown license].
Books
- Pythonic Application Architecture Patterns for Managing Complexity - A Book about Pythonic Application Architecture Patterns for Managing Complexity. Cosmos is the Opposite of Chaos you see. O'R. wouldn't actually let us call it "Cosmic Python" tho. [π, Other license].
Software
Archived or unmaintained DI frameworks
- Antidote - Dependency injection for Python. [π, MIT License].
- Serum - Dependency injection framework for Python 3.6. [π, MIT License].
- Aiodine - π§ͺ Async-first Python dependency injection library. [π, MIT License].
- Wiring - Architectural foundation for Python applications. [π, Apache License 2.0].
DI components of Web frameworks
DI Frameworks / Containers
- Lagom - wiring dependency injection with support for async and threading. [π, MIT License].
- python-dependency-injector - Dependency injection framework for Python. [π, BSD 3-Clause "New" or "Revised" License].
- returns - Make your functions return something meaningful, typed, and safe!. [π, BSD 2-Clause "Simplified" License].
- Injector - Python dependency injection framework, inspired by Guice. [π, BSD 3-Clause "New" or "Revised" License].
- Inject - Python dependency injection. [π, Apache License 2.0].
- Kink - Dependency injection container made for Python. [π, MIT License].
- Dependencies - Constructor injection designed with OOP in mind. [π, BSD 2-Clause "Simplified" License].
- Dishka - Cute DI framework with agreeable API and everything you need. [π, Apache License 2.0].
- Punq - An IoC container for Python 3.6+. [π, MIT License].
- svcs - A Flexible Service Locator for Python. [π, MIT License].
- That Depends - simple DI-framework, inspired by python-dependency-injector, but without wiring [π, MIT License].
- injectable - Python Dependency Injection for Humansβ’. [π, MIT License].
- Wireup - Concise, Powerful, and Type-Safe Python Dependency Injection Library. [π, MIT License].
- Opyoid - Dependency injection library for Python. [π, MIT License].
- Fresh Bakery - Bake dependency injections asynchronously and stupidly simple. [π, MIT License].
- andi - Library for annotation-based dependency injection. [π, BSD 3-Clause "New" or "Revised" License].
- Picodi - A DI library inspired by FastAPI. It integrates well with FastAPI but can also be used independently. [π, MIT License].
- Clean IoC - A simple unintrusive dependency injection library for python with strong support for generics [π, MIT License].
- injection - replacement for python-dependency-injector that works with Python 3.8-3.12 and works with FastAPI, DRF, Flask and Litestar [π, MIT License].
- FastDepends - FastAPI Dependency Injection system extracted from FastAPI and cleared of all HTTP logic. [π, MIT License].
- Modern DI - powerful DI-framework with scopes and IoC-container [π, MIT License].
- engin - a dependency injection powered application framework, inspired by Uber's fx framework. [π, MIT License].
- ididi - Genius simplicity, unmathced power, dependency injection in a single line of code. [π, MIT License]
- python-injection - Dead-simple dependency injection framework for Python. [π, MIT License].
- diwire - Type-safe dependency injection for Python with auto-wiring, scopes, async factories, and zero deps [π, MIT License].
- Overlay - A dependency injection framework with pytest-fixture syntax, plus a configuration language for declarative programming [π, MIT License].
- Injex - Tiny typed dependency injection container with constructor injection, singleton/transient/scoped lifetimes, test overrides, and graph validation before startup. Zero runtime dependencies. [π, MIT License].
- cdi-di - powerful python dependency injection, support generics, circular dep, lifetimes and more [π, MIT License].
Integration with web frameworks
- Flask-Injector - Adds Injector support to Flask. [π, BSD 3-Clause "New" or "Revised" License].