[Baypiggies] Are there any good examples of implementing dependency inversion in Python?

Marc Abramowitz msabramo at gmail.com
Sun Feb 26 16:24:17 EST 2017


I personally haven't seen that pattern used a ton in Python code, compared to Java where Spring and such tend to be a very big thing. 

The one thing that comes to my mind is the "funcargs" mechanism for fixtures in py.test. 

http://doc.pytest.org/en/latest/fixture.html

Maybe WSGI could also be considered a form of dependency injection?

I have looked for general DI containers on occasions and there are some projects that do that, but I don't think these are very popular. 

-Marc
http://marc-abramowitz.com
Sent from my iPhone 6+


> On Feb 26, 2017, at 12:55 PM, Braun Brelin <bbrelin at gmail.com> wrote:
> 
> Hi, 
> 
> Looking for some good examples of Dependency Inversion in Python.  Anyone have any suggestions for sites to look at?
> 
> Thanks,
> _______________________________________________
> Baypiggies mailing list
> Baypiggies at python.org
> To change your subscription options or unsubscribe:
> https://mail.python.org/mailman/listinfo/baypiggies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20170226/adc4afb8/attachment.html>


More information about the Baypiggies mailing list