Skip to content

Instantly share code, notes, and snippets.

View nmaynes's full-sized avatar
♻️
Recycling

Nathan M nmaynes

♻️
Recycling
View GitHub Profile
@bhtucker
bhtucker / upsert.py
Last active April 3, 2024 15:56
A demonstration of Postgres upserts in SQLAlchemy
"""
Upsert gist
Requires at least postgres 9.5 and sqlalchemy 1.1
Initial state:
[]
Initial upsert: