From ea2f81f83a14d8ddb1a2a5f8adb65d3293f92190 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Fri, 10 Jul 2020 15:18:22 -0400 Subject: [PATCH] Update README with ghnav container example --- README.rst | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/README.rst b/README.rst index 60e0b6b0..2319a5d7 100644 --- a/README.rst +++ b/README.rst @@ -58,9 +58,10 @@ Example: .. code-block:: python from dependency_injector import containers, providers + from dependency_injector.ext import flask from github import Github - from . import services, views, webapp + from . import services, views class Application(containers.DeclarativeContainer): @@ -87,19 +88,15 @@ Example: ) app = providers.Factory( - webapp.create_app, + flask.create_app, name=__name__, routes=[ - webapp.Route('/', 'index', index_view, methods=['GET']), + flask.Route('/', view_provider=index_view), ], ) -You can find more ``Dependency Injector`` examples in the ``/examples`` directory -on the GitHub: - - https://github.com/ets-labs/python-dependency-injector - +See complete ``Flask`` + ``Dependency Injector`` `example `_ How to install? ---------------