python-dependency-injector
python-dependency-injector copied to clipboard
Provider import string
Can we implement something like that?
In dependency_injector
i see it like that:
from dependency_injector import containers, providers
class Container(containers.DeclarativeContainer):
persist_user = providers.Factory("app.repositories.create_user")
Or a custom provider like providers.ImportFactory
Hi @al-stefanitsky-mozdor ,
Thanks for bringing up the idea. I tried to stay away from the string identifiers the last couple of years, but this has changed in the past few releases. I don't see why not implement this. I'll add a backlog item for this.