jeni-python
jeni-python copied to clipboard
jeni injects annotated dependencies
I read this > jeni lets developers build applications and not e.g. web applications. and honestly had no clue whatsoever what it meant. In fact on first read, I thought...
This implements the change proposed in #17. @rduplain
Instead of writing: ``` python @Injector.factory('send_mail') def send_mail_factory(send_mail: annotate.partial(send_mail)): return send_mail ``` What if you could just write: ``` python Injector.alias('send_mail', annotate.partial(send_mail)) ``` Another possible use: ``` python # In...
We've seen how `Injector.value()` can be problematic, and injector already has an instance scoped `values` dict. But we lack an API for populating it. `Injector.sub()` uses kwargs to create instance...
Currently `injector.apply(fn)` doesn't tolerate missing services even if the target function has a default for the given argument or a value was provided by the caller. However, in this case...
The following no longer works since `FactoryProvider` was written. ``` python @Injector.factory('foo') def get_foo(name): return 'foo '+name ``` The fix is to call the nameless form lazily (and write a...
We have a large project which uses jeni, and it has an "incubator" style feature which supports `Injector.apply` on classes with annotated methods. We could look at moving that feature...
... and jeni should consider it one, via @groner, +1 from me.
The **jeni** project constructs API docs into its README. Does this suffice? At which point does the project need more then the README?