Hello!
I was looking into python-inject, but I can't find a way to do static binding:
This is how it works in python-inject right now:
class Foo:
pass
def my_configure(binder):
binder.bind(Foo, Foo())
binder.bind_to_constructor(Foo, Foo)
inject.configure(my_configure)
I would like to do something else:
class Foo:
pass
inject.bind(Foo, Foo())
Is it feasible to do in python-inject? I checked the source and it doesn't seem I can call inject.configure multiple times, because it will raise an exception. Basically I would to bind and configure stuff the same way I inject them, using just the module: inject.bind, inject.bind_to_constructor.
Thanks, and thanks for python-inject!
Krystian Kichewko