python-dependency-injector
python-dependency-injector copied to clipboard
add method to container
trafficstars
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'
did you find any solution?