python-dependency-injector/examples/providers/factory.py
Roman Mogylatov 1ad852d193
Factory provider docs update (#287)
* Update index page

* Update providers index page

* Make a little wording fix on containers index page

* Refactor factory provider docs header

* Update factory injection docs

* Update factory init injections example and picture

* Start work on underlying providers

* Finish the docs for factory arguments to the underlying providers

* Edit providers delegation section

* Edit section about specialized factory provider

* Edit abstract factory section

* Edit FactoryAggregate docs

* Add meta keywords and description
2020-08-31 21:26:21 -04:00

16 lines
227 B
Python

"""`Factory` providers example."""
from dependency_injector import providers
class User:
...
users_factory = providers.Factory(User)
if __name__ == '__main__':
user1 = users_factory()
user2 = users_factory()