mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-23 01:56:58 +03:00
4ddac663d9
* Add test * Add fix * Add extra test * Remove package imports on discovery for Python versions < 3.6 * Move wiring samples to a different directory
18 lines
356 B
Python
18 lines
356 B
Python
from dependency_injector import containers, providers
|
|
|
|
from .service import Service
|
|
|
|
|
|
class SubContainer(containers.DeclarativeContainer):
|
|
|
|
int_object = providers.Object(1)
|
|
|
|
|
|
class Container(containers.DeclarativeContainer):
|
|
|
|
config = providers.Configuration()
|
|
|
|
service = providers.Factory(Service)
|
|
|
|
sub = providers.Container(SubContainer)
|