mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-25 11:04:01 +03:00
Update doc blocks for examples in README
This commit is contained in:
parent
e669270bfb
commit
d6f48b6e1d
12
README.rst
12
README.rst
|
@ -69,7 +69,7 @@ system that consists from several business and platform services:
|
|||
|
||||
|
||||
class Platform(containers.DeclarativeContainer):
|
||||
"""Container of platform service providers."""
|
||||
"""IoC container of platform service providers."""
|
||||
|
||||
database = providers.Singleton(sqlite3.connect, ':memory:')
|
||||
|
||||
|
@ -79,7 +79,7 @@ system that consists from several business and platform services:
|
|||
|
||||
|
||||
class Services(containers.DeclarativeContainer):
|
||||
"""Container of business service providers."""
|
||||
"""IoC container of business service providers."""
|
||||
|
||||
users = providers.Factory(example.services.Users,
|
||||
db=Platform.database)
|
||||
|
@ -128,7 +128,7 @@ IoC containers from previous example could look like these:
|
|||
.. code-block:: python
|
||||
|
||||
class Platform(containers.DeclarativeContainer):
|
||||
"""Container of platform service providers."""
|
||||
"""IoC container of platform service providers."""
|
||||
|
||||
database = providers.Singleton(sqlite3.connect) \
|
||||
.add_args(':memory:')
|
||||
|
@ -139,7 +139,7 @@ IoC containers from previous example could look like these:
|
|||
|
||||
|
||||
class Services(containers.DeclarativeContainer):
|
||||
"""Container of business service providers."""
|
||||
"""IoC container of business service providers."""
|
||||
|
||||
users = providers.Factory(example.services.Users) \
|
||||
.add_kwargs(db=Platform.database)
|
||||
|
@ -157,7 +157,7 @@ or like this these:
|
|||
.. code-block:: python
|
||||
|
||||
class Platform(containers.DeclarativeContainer):
|
||||
"""Container of platform service providers."""
|
||||
"""IoC container of platform service providers."""
|
||||
|
||||
database = providers.Singleton(sqlite3.connect)
|
||||
database.add_args(':memory:')
|
||||
|
@ -168,7 +168,7 @@ or like this these:
|
|||
|
||||
|
||||
class Services(containers.DeclarativeContainer):
|
||||
"""Container of business service providers."""
|
||||
"""IoC container of business service providers."""
|
||||
|
||||
users = providers.Factory(example.services.Users)
|
||||
users.add_kwargs(db=Platform.database)
|
||||
|
|
Loading…
Reference in New Issue
Block a user