from pathlib import Path import sys ROOT = Path(__file__).resolve().parents[1] if str(ROOT) not in sys.path: sys.path.insert(0, str(ROOT)) from sqlalchemy import text from src.db.engine import engine def main() -> None: with engine.connect() as connection: result = connection.execute(text("select 1")) value = result.scalar_one() print(f"database connection ok: {value}") if __name__ == "__main__": main()