Leveraging Google's Pinject to Write Loosely Coupled Python Code

Written by lastlegion | Published 2020/09/06
Tech Story Tags: programming | python | clean-code | flask | software-engineering | software-testing | coding | hackernoon-top-story

TLDR Dependency Injection is a set of software design principles that enable engineers to develop loosely coupled code. In this post, we’re going to see how we can leverage Google’s Pinject library to help us write loosely coupled Python code. Our example is an intentionally convoluted application that employs the 3 layered application model to print “Hello World” on the user's screen. Pinject has defaults based on PEP8 and implicitly binds classes based on conventions. An arg named Foo will automatically be bounded to the class on the class Foo.via the TL;DR App

no story

Published by HackerNoon on 2020/09/06