def __init__(self, db_url, echo=True): self._Session, self._engine = db_connection.connect( db_url=db_url, echo=echo) self._clients = [] self._admin_pass = "******" self._gen_passwords = PasswordGen() self._perm = 'admin'
def connection(): # db_url = 'sqlite:///' db_url = 'mysql+pymysql://root:root@localhost:8889/test' Session, engine = db_connection.connect(db_url, echo=False, drop_all=True) return Session