mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-30 05:23:59 +03:00
c50322db02
* 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
20 lines
414 B
Python
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)
|