Python module for incremental building of SQL queries