<filename>util/DB.py
from sqlalchemy import create_engine

class DB():
    def __init__(self, username, password, host, port, database):
        self.username = username
        self.password = password
        self.host = host
        self.port = port
        self.database = database
        self.engine = create_engine('mysql+mysqldb://%s:%s@%s:%i/%s'
                           %(username, password, host, port, database))
<filename>util/DB.py
from sqlalchemy import create_engine

class DB():
    def __init__(self, username, password, host, port, database):
        self.username = username
        self.password = password
        self.host = host
        self.port = port
        self.database = database
        self.engine = create_engine('mysql+mysqldb://%s:%s@%s:%i/%s'
                           %(username, password, host, port, database))