python-dependency-injector/examples/miniapps/services/run.py

21 lines
595 B
Python
Raw Normal View History

2016-10-11 17:45:56 +03:00
"""Run example application."""
2016-10-06 22:48:43 +03:00
import sys
import logging
from containers import Core, Application
2016-09-18 23:00:10 +03:00
if __name__ == '__main__':
# Configure platform:
2017-03-15 18:26:59 +03:00
Core.config.update({'database': {'dsn': ':memory:'},
'aws': {'access_key_id': 'KEY',
'secret_access_key': 'SECRET'},
'auth': {'token_ttl': 3600}})
Core.logger().addHandler(logging.StreamHandler(sys.stdout))
2016-10-06 22:48:43 +03:00
# Run application:
Application.main(uid=sys.argv[1],
password=sys.argv[2],
photo=sys.argv[3])