Python SQL Passer des Parametres Dans Une Requet Pymysql

# Connect to db
# Open a cursor
stmt = "SELECT * FROM users WHERE username = %(user)s"
cursor.execute(stmt, {"user": "bob"})
user = cursor.fetchone()
print user

{"username": "bob", "alias": "bobby", "avatar": "default", "fullname": "bob"}
Fancy Fly