def __init__(self, connection_string, **kwargs):
        """Initiate a database engine which is very low level, and a database session which deals with orm."""

        # Solve an issue with mysql character encoding(maybe it's a bug of MySQLdb)
        # Refer to http://plone.293351.n2.nabble.com/Troubles-with-encoding-SQLAlchemy-MySQLdb-or-mysql-configuration-pb-td4827540.html
        if 'mysql:' in connection_string and 'charset=' not in connection_string:
            raise ValueError("""No charset was specified for a mysql connection string.
Please specify something like '?charset=utf8' explicitly.""")

        self.engine = create_engine(connection_string, convert_unicode = True, encoding = 'utf-8', **kwargs)
        self.session = SessionExtension.extend(scoped_session(sessionmaker(autocommit = False, autoflush = False, bind = self.engine)))
dataset/ETHPy150Open tylerlong/quick_orm/quick_orm/core.py/Database.__init__/original