Here\'s my (PostgreSQL) table --
test=> create table people (name varchar primary key, marriage_status varchar) ; test=>
Since SQLAlchemy 0.7.9 you may use the is_ method of the column.
is_
A filter expression like:
filter(or_(people.marriage_status!='married', people.marriage_status.is_(None)))
will generate the parameterized SQL:
WHERE people.marriage_status != %(status_1)s OR people.marriage_status IS NULL