mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-25 19:14:00 +03:00
Update run script for services example
This commit is contained in:
parent
dde52a5d0f
commit
c93b6fcfdf
16
README.rst
16
README.rst
|
@ -147,17 +147,11 @@ several IoC containers for some example application:
|
|||
auth_service=Services.auth,
|
||||
photos_service=Services.photos)
|
||||
|
||||
Next example demonstrates run of dependency injection example application
|
||||
defined above:
|
||||
Next example demonstrates run of example application defined above:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
"""Run dependency injection example application.
|
||||
|
||||
Instructions for running:
|
||||
|
||||
python run.py 1 secret photo.jpg
|
||||
"""
|
||||
"""Run example application."""
|
||||
|
||||
import sys
|
||||
import logging
|
||||
|
@ -192,12 +186,6 @@ defined above:
|
|||
# photos_service=example.services.Photos(logger=logger,
|
||||
# db=database,
|
||||
# s3=s3))
|
||||
#
|
||||
# Output:
|
||||
#
|
||||
# User 1 has been found in database
|
||||
# User 1 has been successfully authenticated
|
||||
# Photo photo.jpg has been successfully uploaded by user 1
|
||||
|
||||
Alternative definition styles of providers
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
"""Run dependency injection example application.
|
||||
|
||||
Instructions for running:
|
||||
|
||||
python run.py 1 secret photo.jpg
|
||||
"""
|
||||
"""Run example application."""
|
||||
|
||||
import sys
|
||||
import logging
|
||||
|
@ -38,9 +33,3 @@ if __name__ == '__main__':
|
|||
# photos_service=example.services.Photos(logger=logger,
|
||||
# db=database,
|
||||
# s3=s3))
|
||||
#
|
||||
# Output:
|
||||
#
|
||||
# User 1 has been found in database
|
||||
# User 1 has been successfully authenticated
|
||||
# Photo photo.jpg has been successfully uploaded by user 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user