TUI von direkten Service-Importen auf httpx API-Calls umgestellt. Neue tui/api_client.py als schlanker async HTTP-Client. Background- Worker pollt API alle 5s für Echtzeit-Updates. Neuer tui_standalone.py Entry-Point für 'textual serve --port 8001 tui_standalone.py'.
22 lines
509 B
Python
22 lines
509 B
Python
"""MCM TUI – Standalone Entry Point für textual serve.
|
||
|
||
Startet nur die TUI (kein API-Server, keine Channels).
|
||
Die TUI spricht via HTTP gegen den laufenden MCM-API-Server.
|
||
|
||
Verwendung:
|
||
# API-Server muss bereits laufen:
|
||
python main_api_only.py
|
||
|
||
# TUI im Browser starten:
|
||
.venv/bin/python -m textual serve --host 0.0.0.0 --port 8001 tui_standalone.py
|
||
|
||
# Dann im Browser öffnen: http://<host>:8001
|
||
"""
|
||
|
||
from tui.app import MCMApp
|
||
|
||
app = MCMApp()
|
||
|
||
if __name__ == "__main__":
|
||
app.run()
|