mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-23 19:21:12 +01:00
13 lines
271 B
Python
13 lines
271 B
Python
# backend/app/db/connection.py
|
|
import sqlite3
|
|
from ..config import config
|
|
|
|
DB_PATH = config.DB_PATH
|
|
|
|
|
|
def get_db():
|
|
"""Create and return a database connection with Row factory."""
|
|
conn = sqlite3.connect(DB_PATH)
|
|
conn.row_factory = sqlite3.Row
|
|
return conn
|