mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
better perf
This commit is contained in:
+7
-16
@@ -1,19 +1,10 @@
|
||||
from argenta import App, DataBridge, Response, Router
|
||||
from argenta.di import FromDishka
|
||||
from argenta.di.integration import setup_dishka, _auto_inject_handlers
|
||||
from argenta.di.providers import SystemProvider
|
||||
from dishka import make_container
|
||||
from argenta import Command, Response, Router
|
||||
from argenta.command import InputCommand
|
||||
|
||||
container = make_container()
|
||||
|
||||
Response.patch_by_container(container)
|
||||
|
||||
app = App()
|
||||
router = Router()
|
||||
|
||||
@router.command('command')
|
||||
def handler(res: Response, data_bridge: FromDishka[DataBridge]):
|
||||
print(data_bridge)
|
||||
|
||||
_auto_inject_handlers(app)
|
||||
_auto_inject_handlers(app)
|
||||
@router.command(Command('heLLo'))
|
||||
def handler(_res: Response) -> None:
|
||||
print("Hello World!")
|
||||
|
||||
router.finds_appropriate_handler(InputCommand('HellO'))
|
||||
|
||||
Reference in New Issue
Block a user