No project description provided
Project description
Another simple ioc framework for python.
Usage
from anyioc import ServiceProvider
provider = ServiceProvider()
provider.register_singleton('the key', lambda x: 102) # x will be scoped ServiceProvider
value = provider.get('the key')
assert value == 102
Need global ServiceProvider ? try from anyioc.g import ioc.
There are some predefined key you can use direct, but you still can overwrite it:
ioc - get current scoped ServiceProvider instance.
provider - alias of ioc
service_provider - alias of ioc
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
anyioc-0.4.2.tar.gz
(5.2 kB
view hashes)
Built Distribution
anyioc-0.4.2-py3-none-any.whl
(8.8 kB
view hashes)