I had planned to &quot;show it to HN&quot; soon, but the occasion is too good now: I have also created a thin &quot;psycopg2 wrapper&quot;, pretty much in the same spirit as Records (but different in purpose), which allows you to perform SQL operations with plain data structures:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;cjauvin&#x2F;little_pger" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;cjauvin&#x2F;little_pger</a><p>I have been using this for myself for quite some time, but feedback would be very appreciated!<p>Edit: A cool thing about it (I believe) is that it provides an &quot;upsert wrapper&quot; which makes use of either the new PG 9.5 &quot;on conclict&quot; mechanism if it&#x27;s available, or an &quot;update if exists, insert if not&quot; two-step fallback, for previous versions.