python-dependency-injector/examples/di_demo/example_no_di.py

19 lines
275 B
Python
Raw Normal View History

2020-08-14 22:45:30 +03:00
import os
class ApiClient:
def __init__(self):
self.api_key = os.getenv('API_KEY')
self.timeout = os.getenv('TIMEOUT')
class Service:
def __init__(self):
self.api_client = ApiClient()
2020-08-15 18:01:58 +03:00
if __name__ == '__main__':
service = Service()