Skip to content

add method to container #822

New issue

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

Open
antonio-antuan opened this issue Oct 3, 2024 · 1 comment
Open

add method to container #822

antonio-antuan opened this issue Oct 3, 2024 · 1 comment

Comments

@antonio-antuan
Copy link

Is there any way to add a method to container?

from dependency_injector import containers


class Container(containers.DeclarativeContainer):

    def check(self):
        print('check')


c = Container()
c.check()

this code raises AttributeError: 'DynamicContainer' object has no attribute 'check'

@mhassan5809
Copy link

did you find any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants