We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I cannot figure out why the config is a dictionary, while in every example it is an object with "." (dot) operator to access its variables.
Here is a simple code that I used:
from dependency_injector import containers, providers from dependency_injector.wiring import Provide, inject class Container(containers.DeclarativeContainer): config = providers.Configuration() @inject def use_config(config: providers.Configuration = Provide[Container.config]): print(type(config)) print(config) if __name__ == "__main__": container = Container() container.config.from_yaml("config.yaml") container.wire(modules=[__name__]) use_config()
and the type is a 'dict'
The text was updated successfully, but these errors were encountered:
I'm experiencing the same problem.
Sorry, something went wrong.
No branches or pull requests
I cannot figure out why the config is a dictionary, while in every example it is an object with "." (dot) operator to access its variables.
Here is a simple code that I used:
and the type is a 'dict'
The text was updated successfully, but these errors were encountered: