mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 18:15:28 +03:00
docs
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# main.py
|
||||
from routers import router
|
||||
|
||||
from argenta import App, Orchestrator
|
||||
|
||||
app: App = App()
|
||||
orchestrator: Orchestrator = Orchestrator()
|
||||
|
||||
def main() -> None:
|
||||
app.include_router(router)
|
||||
orchestrator.start_polling(app)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# routers.py
|
||||
from argenta import Command, Response, Router
|
||||
|
||||
router = Router(title="Quickstart Example")
|
||||
|
||||
@router.command(Command("hello", description="Say hello"))
|
||||
def handler(response: Response):
|
||||
print("Hello, world!")
|
||||
|
||||
Reference in New Issue
Block a user