Other python database adapters support specifying a name for the parameters in the SQL string and passing a dict to execute(), to bind the parameters to its values. Something like this:
> cur.execute('select * from customers where id = %(cid)d', {'cid': 3})