mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
69 lines
1.3 KiB
Markdown
69 lines
1.3 KiB
Markdown
# Argenta
|
|
|
|
### Library for creating modular CLI applications
|
|
|
|
#### RU - [README.ru.md](https://github.com/koloideal/Argenta/blob/kolo/README.ru.md) • DE - [README.de.md](https://github.com/koloideal/Argenta/blob/kolo/README.de.md)
|
|
|
|

|
|
|
|
---
|
|
|
|
# Installing
|
|
```bash
|
|
pip install argenta
|
|
```
|
|
or
|
|
```bash
|
|
poetry add argenta
|
|
```
|
|
|
|
---
|
|
|
|
# Quick start
|
|
|
|
An example of a simple application
|
|
```python
|
|
# routers.py
|
|
from argenta.router import Router
|
|
from argenta.command import Command
|
|
from argenta.response import Response
|
|
|
|
|
|
router = Router()
|
|
|
|
@router.command(Command("hello"))
|
|
def handler(response: Response):
|
|
print("Hello, world!")
|
|
```
|
|
|
|
```python
|
|
# main.py
|
|
from argenta.app import App
|
|
from argenta.orchestrator import Orchestrator
|
|
from routers import router
|
|
|
|
app: App = App()
|
|
orchestrator: Orchestrator = Orchestrator()
|
|
|
|
|
|
def main() -> None:
|
|
app.include_router(router)
|
|
orchestrator.start_polling(app)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|
|
```
|
|
|
|
---
|
|
|
|
# Features in development
|
|
|
|
- Full support for autocompleter on Linux
|
|
- Ability to configure stdout capture when handling input by the handler
|
|
|
|
## Full [docs](https://argenta-docs.vercel.app) | MIT 2025 kolo | made by [kolo](https://t.me/kolo_id)
|
|
|
|
|
|
|