mirror of
https://github.com/Rainyy21/URL_shortener.git
synced 2026-10-11 00:40:13 -04:00
10 lines
328 B
Python
10 lines
328 B
Python
from sqlalchemy import create_engine, engine
|
|
from sqlalchemy.orm import sessionmaker, declarative_base
|
|
|
|
DATABASE_URL = "sqlite:///./db/urls.db"
|
|
|
|
engine = create_engine(DATABASE_URL, connect_args={"check_same_thread": False})
|
|
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
|
|
|
Base = declarative_base()
|