import MySQLdb
import MySQLdb.cursors 
conn = MySQLdb.connec('localhost','root','test456','db_test',charset='utf8',cursorclass = MySQLdb.cursors.DictCursor)