mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-29 04:53:59 +03:00
0bb30f91ef
* Update docblocks of factory provider examples * Edit singleton docs
16 lines
226 B
Python
16 lines
226 B
Python
"""`Factory` provider example."""
|
|
|
|
from dependency_injector import providers
|
|
|
|
|
|
class User:
|
|
...
|
|
|
|
|
|
users_factory = providers.Factory(User)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
user1 = users_factory()
|
|
user2 = users_factory()
|