Skip to content

Instantly share code, notes, and snippets.

@copdips
copdips / upsert.py
Created March 9, 2019 01:10 — forked from bhtucker/upsert.py
A demonstration of Postgres upserts in SQLAlchemy
"""
Upsert gist
Requires at least postgres 9.5 and sqlalchemy 1.1
Initial state:
[]
Initial upsert: