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