#db/utils.py from db import get_db def insert_log(log_entry): with get_db() as db: db.add(log_entry) db.commit()