Stop Hardcoding Everything: Use Dependency Injection

Veröffentlicht am: 28 November 2025
auf dem Kanal: ArjanCodes
135,870
4.5k

→ Check out Thesys here: https://www.thesys.dev/?utm_source=yo...

In this video, I explore how Dependency Injection can make your Python code cleaner, more testable, and easier to extend, using a real-world data pipeline example. I start with a tightly coupled version and progressively refactor it using manual injection, a lightweight custom DI container, and even show how frameworks like FastAPI handle DI under the hood.

Design pattern playlist:    • Design Patterns  

🔥 GitHub Repository: https://git.arjan.codes/2025/di.

🎓 ArjanCodes Courses: https://www.arjancodes.com/courses.

💬 Join my Discord server: https://discord.arjan.codes.

⌨️ Keyboard I’m using: https://amzn.to/49YM97v.

🔖 Chapters:
0:00 Intro
0:57 The Problem: No DI
1:29 What Is Dependency Injection?
2:13 Refactoring with Manual DI
17:19 Going Further: A Simple DI Container
28:04 Dependency Injection in FastAPI
29:53 Use Cases for Dependency Injection
30:52 Final Thoughts

#arjancodes #softwaredesign #python


Auf dieser Seite können Sie das Online-Video Stop Hardcoding Everything: Use Dependency Injection mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer ArjanCodes 28 November 2025 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 135,870 Mal angesehen und es wurde von 4.5 tausend den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!