1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Administrator-py/db/__init__.py

10 lines
328 B
Python
Raw Normal View History

2020-05-27 23:08:23 +02:00
from bot_bde.config import config
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
engine = create_engine(config.get("db"))
Session = sessionmaker(bind=engine)
Base = declarative_base()
#from db.foo import Barr
Base.metadata.create_all(engine)