2020-08-01 19:04:35 +02:00
|
|
|
from sqlalchemy import create_engine
|
2020-06-05 01:09:55 +02:00
|
|
|
from sqlalchemy.ext.declarative import declarative_base
|
2020-07-03 02:03:02 +02:00
|
|
|
from sqlalchemy.orm import sessionmaker
|
2020-07-03 13:30:01 +02:00
|
|
|
|
|
|
|
from constants import DB
|
2020-06-05 01:09:55 +02:00
|
|
|
|
2020-07-03 13:30:01 +02:00
|
|
|
engine = create_engine(DB, connect_args={"check_same_thread": False})
|
2020-07-03 02:03:02 +02:00
|
|
|
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
|
2020-06-05 01:09:55 +02:00
|
|
|
Base = declarative_base()
|