Python dictionary wrapper around a SQL database