Josiah Kaviani

Results 172 issues of Josiah Kaviani

You can inject: * dictionaries * functions * integers

documentation

Dependency injection is all about composition. Would you use **global** mocks in the **production** code? > it is not for mocking, it is for isolation with composition > DI is...

documentation

Include an explanation of this thesis in the FAQ. A quote from @asvetlov: > Dependency injection is a worse version of context-local variables, isn't it? > > Like in singleton...

documentation

Service locator needs massive changes in the code base. We can avoid it with `TestInjector` or `Mocker` which will need to define ones. So if we need to add injection...

documentation

We tried new approach in the `generics` library. Every documentation page is a standalone document. Every documentation page contains table of contents. Every item in the table of contents should...

documentation

```python class Container(Injector): app = App @value async def dep(): ... ``` ```python Container.app # error ``` We force `await Container` before any attribute access.

feature

Value decorator can be applied to the coroutine functions. In this case, we should be able to await them before injection. Any attribute access on `Injector` should start dependency injection...

feature