Skip to content

add method to container #822

Open
Open
@antonio-antuan

Description

@antonio-antuan

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions