python-dependency-injector/examples/miniapps/engines_cars/example_di.py
2016-10-19 20:21:20 +03:00

11 lines
329 B
Python

"""Dependency injection example, Cars & Engines."""
import example.cars
import example.engines
if __name__ == '__main__':
gasoline_car = example.cars.Car(example.engines.GasolineEngine())
diesel_car = example.cars.Car(example.engines.DieselEngine())
electro_car = example.cars.Car(example.engines.ElectroEngine())