mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 18:15:28 +03:00
docs
This commit is contained in:
@@ -1,16 +1,10 @@
|
||||
from argenta import App, Orchestrator
|
||||
from argenta.app import PredefinedMessages, StaticDividingLine
|
||||
from argenta.app import PredefinedMessages
|
||||
from argenta.app.dividing_line.models import StaticDividingLine, DynamicDividingLine
|
||||
from mock.mock_app.routers import work_router
|
||||
|
||||
def print_hello(entity: str):
|
||||
with open('hello.txt', 'a') as file:
|
||||
file.write(f'printer called: {entity}\n')
|
||||
print(entity)
|
||||
|
||||
app: App = App(
|
||||
dividing_line=StaticDividingLine(),
|
||||
override_system_messages=True,
|
||||
print_func=print_hello
|
||||
dividing_line=DynamicDividingLine('^'),
|
||||
)
|
||||
orchestrator: Orchestrator = Orchestrator()
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
from argenta import Router, Response, Command
|
||||
|
||||
work_router: Router = Router(title="Base points:")
|
||||
work_router: Router = Router(title="Base points:", disable_redirect_stdout=True)
|
||||
|
||||
|
||||
@work_router.command(Command('hello', description="Hello, world!"))
|
||||
def command_help(response: Response):
|
||||
print('Hello, world!')
|
||||
c = input("Enter your name: ")
|
||||
print(f"Hello, {c}!")
|
||||
|
||||
Reference in New Issue
Block a user