mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2025-05-22 13:36:15 +03:00
Update sanic example
This commit is contained in:
parent
7a6ff43b2c
commit
06d865c7b7
|
@ -112,8 +112,8 @@ The output should be something like:
|
|||
giphynavigator/application.py 12 0 100%
|
||||
giphynavigator/containers.py 6 0 100%
|
||||
giphynavigator/giphy.py 14 9 36%
|
||||
giphynavigator/handlers.py 10 0 100%
|
||||
giphynavigator/handlers.py 11 0 100%
|
||||
giphynavigator/services.py 9 1 89%
|
||||
giphynavigator/tests.py 34 0 100%
|
||||
---------------------------------------------------
|
||||
TOTAL 89 14 84%
|
||||
TOTAL 90 14 84%
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
|
||||
from sanic.request import Request
|
||||
from sanic.response import HTTPResponse, json
|
||||
from dependency_injector.wiring import Provide
|
||||
from dependency_injector.wiring import inject, Provide
|
||||
|
||||
from .services import SearchService
|
||||
from .containers import Container
|
||||
|
||||
|
||||
@inject
|
||||
async def index(
|
||||
request: Request,
|
||||
search_service: SearchService = Provide[Container.search_service],
|
||||
|
|
Loading…
Reference in New Issue
Block a user