Dependency Injection for Humans
Project description
Dependency Injection for Humans
Installation
All released versions are hosted on the Python Package Index. You can install this package with following command.
pip install dependencies
Usage
Dependency injection without dependencies
robot = Robot(
servo=Servo(amplifier=Amplifier()),
controller=Controller(),
settings=Settings(environment="production"),
)
robot.work()
Dependency injection with dependencies
class Container(Injector):
robot = Robot
servo = Servo
amplifier = Amplifier
controller = Controller
settings = Settings
environment = "production"
Container.robot.work()
License
Dependencies library is offered under the two clause BSD license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dependencies-0.16.dev0.tar.gz
(14.2 kB
view hashes)
Built Distribution
Close
Hashes for dependencies-0.16.dev0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99caec5bd828c1bbeff583d4a2cef9fa4ee18ec05d378862ca43bbd064c5c534 |
|
MD5 | e72275c8ffe9921b55ac89ad71f52b38 |
|
BLAKE2b-256 | bd82275e81c392a6427104250229e72e58de9e4e31b4c89665bb763ef4748698 |