Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork0
Dead-simple dependency injection framework for Python.
License
NotificationsYou must be signed in to change notification settings
100nm/python-injection
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Documentation:https://python-injection.remimd.dev
pip install python-injection
Simply apply the decorators and the package takes care of the rest.
frominjectionimportinjectable,inject,singleton@singletonclassPrinter:def__init__(self):self.history= []defprint(self,message:str):self.history.append(message)print(message)@injectableclassService:def__init__(self,printer:Printer):self.printer=printerdefhello(self):self.printer.print("Hello world!")@injectdefmain(service:Service):service.hello()if__name__=="__main__":main()
About
Dead-simple dependency injection framework for Python.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.