teilchensammler-cli/src/teilchensammler_cli/main.py

35 lines
578 B
Python
Raw Normal View History

"""
This is where the application is implemented.
"""
import logging
2025-12-04 19:25:18 +01:00
from textual.app import App
2025-12-28 21:56:57 +01:00
from textual.logging import TextualHandler
from .database import create_db_and_tables
from .tui import AddInventoryScreen
2025-12-28 21:56:57 +01:00
logging.basicConfig(
level="NOTSET",
handlers=[TextualHandler()],
)
logger = logging.getLogger(__name__)
2026-02-18 20:40:58 +01:00
class SammlerApp(App):
async def on_mount(self) -> None:
create_db_and_tables()
_ = self.push_screen(AddInventoryScreen())
app = SammlerApp()
def main() -> None:
app.run()
if __name__ == "__main__":
main()