python-dependency-injector/examples/miniapps/use_cases/run.py
Roman Mogylatov c50322db02
178 dependencies container provider (#179)
* Add DependenciesContainer provider

* Remove bundles_v2 example

* Add use cases example

* Update changelog

* Update documentation requirements to use fixed version of sphinxcontrib-disqus

* Add use cases miniapp to docs

* Update changelog
2018-01-21 23:55:32 +02:00

20 lines
414 B
Python

"""Run 'Use Cases' example application."""
import sys
from containers import Adapters, TestAdapters, UseCases
if __name__ == '__main__':
environment, email = sys.argv[1:]
if environment == 'prod':
adapters = Adapters()
elif environment == 'test':
adapters = TestAdapters()
use_cases = UseCases(adapters=adapters)
use_case = use_cases.signup()
use_case.execute(email)