mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-30 05:23:59 +03:00
15 lines
285 B
Python
15 lines
285 B
Python
"""`Object` provider example."""
|
|
|
|
from dependency_injector import containers, providers
|
|
|
|
|
|
class Container(containers.DeclarativeContainer):
|
|
|
|
object_provider = providers.Object(1)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
container = Container()
|
|
|
|
assert container.object_provider() == 1
|