python-dependency-injector/examples/miniapps/commands-and-handlers/application/__main__.py

13 lines
279 B
Python
Raw Permalink Normal View History

2020-11-21 02:09:34 +03:00
"""Main module."""
from .containers import Container
from .commands import SaveRating, DoSomethingElse
if __name__ == "__main__":
2020-11-21 02:09:34 +03:00
container = Container()
message_bus = container.message_bus()
message_bus.handle(SaveRating)
message_bus.handle(DoSomethingElse)