IoC container for GhostInShells.
GhostInShells follows the concept of interface-oriented programming to build the project.
Most modules are divided into interface and implementation.
Register and get implementations by IoC Container.
About IoC: Inverse of Control
pip install ghoshell-container
setandget, and type check byfetch,force_fetchalias: set alias for contractbindwith factory function, subclass, instance e.t.c- dict interface
- factory class
Providerregistrar boostrapandshutdown- container bloodline inheritance
make: recursively dependencies injection for classcall: recursively dependencies injection for functionget_containerandset_containerby contextvarsdepends: function decoratorInject: class property injectionDeclaredContainer: auto bindings by property
see them in examples