Full threadcjauvin·I have solved a similar problem in a similar way (https://github.com/cjauvin/little_pger) by creating a very thin wrapper just above psycopg2, allowing to assemble SQL queries with kwargs and plain data structures.View on HN