Skip to content

A curated list of awesome things related to dependency inversion / dependency injection in Python. (Contributions welcomed).

Notifications You must be signed in to change notification settings

sfermigier/awesome-dependency-injection-in-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

131 Commits
Β 
Β 

Repository files navigation

Awesome Dependency Injection in Python

A curated list of awesome things related to dependency inversion / dependency injection in Python.

Awesome

Talks / slides

  • Python Dependency Injection (PDF) (Alex Martelli, 2008).
  • Fang: Pythonic dependency injection (video) (Nathan Craike, 2015).

Videos

Articles / blog posts

Books

Software

DI Frameworks / Containers

  • python-dependency-injector β˜…4690 - Dependency injection framework for Python. [🐍, BSD 3-Clause "New" or "Revised" License].
  • returns β˜…4153 - Make your functions return something meaningful, typed, and safe!. [🐍, BSD 2-Clause "Simplified" License].
  • Injector β˜…1474 - Python dependency injection framework, inspired by Guice. [🐍, BSD 3-Clause "New" or "Revised" License].
  • Dishka β˜…930 - Cute DI framework with agreeable API and everything you need. [🐍, Apache License 2.0].
  • Inject β˜…747 - Python dependency injection. [🐍, Apache License 2.0].
  • FastDepends β˜…470 - FastAPI Dependency Injection system extracted from FastAPI and cleared of all HTTP logic. [🐍, MIT License].
  • Kink β˜…435 - Dependency injection container made for Python. [🐍, MIT License].
  • Punq β˜…405 - An IoC container for Python 3.6+. [🐍, MIT License].
  • svcs β˜…391 - A Flexible Service Locator for Python. [🐍, MIT License].
  • di β˜…329 - Pythonic dependency injection. [🐍, MIT License].
  • Lagom β˜…246: Type based auto-wiring dependency injection with support for async and threading. [🐍, MIT License].
  • That Depends β˜…234 - simple DI-framework, inspired by python-dependency-injector, but without wiring [🐍, MIT License].
  • Wireup β˜…232 - Concise, Powerful, and Type-Safe Python Dependency Injection Library. [🐍, MIT License].
  • Rodi β˜…230 - Implementation of dependency injection for Python 3. [🐍, MIT License].
  • injectable β˜…119 - Python Dependency Injection for Humansβ„’. [🐍, MIT License].
  • python-injection β˜…107 - Dead-simple dependency injection framework for Python. [🐍, MIT License].
  • Opyoid β˜…75 - Dependency injection library for Python. [🐍, MIT License].
  • Modern DI β˜…43 - powerful DI-framework with scopes and IoC-container [🐍, MIT License].
  • Picodi β˜…27 - A DI library inspired by FastAPI. It integrates well with FastAPI but can also be used independently. [🐍, MIT License].
  • andi β˜…24 - Library for annotation-based dependency injection. [🐍, BSD 3-Clause "New" or "Revised" License].
  • Fresh Bakery β˜…21 - Bake dependency injections asynchronously and stupidly simple. [🐍, MIT License].
  • engin β˜…20 - a dependency injection powered application framework, inspired by Uber's fx framework. [🐍, MIT License].
  • ididi β˜…18 - Genius simplicity, unmathced power, dependency injection in a single line of code. [🐍, MIT License]
  • injection β˜…17 - replacement for python-dependency-injector that works with Python 3.8-3.12 and works with FastAPI, DRF, Flask and Litestar [🐍, MIT License].
  • Clean IoC β˜…11 - A simple unintrusive dependency injection library for python with strong support for generics [🐍, MIT License].

DI components of Web frameworks

Several modern Python web frameworks include DI components, including:

Archived or unmaintained DI frameworks

  • Antidote β˜…88 - Dependency injection for Python. [🐍, MIT License].
  • Serum β˜…86 - Dependency injection framework for Python 3.6. [🐍, MIT License].
  • Aiodine β˜…53 - πŸ§ͺ Async-first Python dependency injection library. [🐍, MIT License].
  • Wiring β˜…26 - Architectural foundation for Python applications. [🐍, Apache License 2.0].

Integration with web frameworks

  • Flask-Injector β˜…282 - Adds Injector support to Flask. [🐍, BSD 3-Clause "New" or "Revised" License].

See also above.

About

A curated list of awesome things related to dependency inversion / dependency injection in Python. (Contributions welcomed).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 20