I installed py-dbutils (pip install py-dbutils), but when I run gives and error message: from dbutils import db_connect ImportError: cannot import name 'db_connect' from 'dbutils' I do not know if db_connect changed to another name. Thanks.
from dbutils import db_connect
DEFAULT_PATH = os.path.join(os.path.dirname(__file__), 'mailroom.db')
def db_connect(db_path = DEFAULT_PATH):
'''Connect to the database and also creates it'''
conn = sqlite3.connect(db_path)
return conn