datastax/python-driver — pull request #81 by joaquincasares (2014-02-15 20:23:31+00:00)
Title: Bound dicts

Add support for executing commands like: `session.execute(bound, {'col_name1': 1, 'col_name2': 2})`.

The existing code shouldn't be affected if dicts aren't used. Also, I've added helpful error checking in cases that a column name is missing from the provided dict and explaining which dict keys are superfluous.

I understand this code is probably better kept on the client-side, but this would make for clearer tutorials on how to use the Python Driver with a json-like format. It also promotes increased usage of the BoundStatement, which is a better practice than one-off statements.