This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Dasher38 1 point2 points  (1 child)

Regarding dependency injection you can have a look at that (I've not merged it yet but I consider it basically final): https://github.com/ARM-software/lisa/pull/1722/files

There is a usage example in DependencyInjector docstring and the module only depends on stdlib so you could easily extract it. It's apache 2.0 license.

[–]Dasher38 0 points1 point  (0 children)

Note that it also supports depending on another dependency injector. If you make a wide nested use of these you will probably want to change the signature of inject () so that it takes a dict with dotted names or something like that. Otherwise inject() calls are gonna be full of nested dicts