

def _connect(self, database, **kwargs):
    if (not mysql):
        raise ImproperlyConfigured('MySQLdb or PyMySQL must be installed.')
    conn_kwargs = {
        'charset': 'utf8',
        'use_unicode': True,
    }
    conn_kwargs.update(kwargs)
    if ('password' in conn_kwargs):
        conn_kwargs['passwd'] = conn_kwargs.pop('password')
    return mysql.connect(db=database, **conn_kwargs)

dataset/ETHPy150Open coleifer/peewee/peewee.py MySQLDatabase._connect/original