Skip to content

Instantly share code, notes, and snippets.

View hilmanski's full-sized avatar

Hilman Ramadhan hilmanski

View GitHub Profile
doobeh /
Created September 8, 2015 18:24
SQLAlchemy bulk updates.
""" Quick example showing how to do a bulk update into the database
using SQLAlchemy, without interacting heavily with the ORM.
from sqlalchemy.sql.expression import bindparam
stmt = addresses.update().\
where( == bindparam('_id')).\
'user_id': bindparam('user_id'),
'email_address': bindparam('email_address'),