sel = select([literal('1'), literal('John')]).where(~exists([example_table.
    c.id]).where(example_table.c.id == 1))
ins = example_table.insert().from_select(['id', 'name'], sel)
Postgresql - Insert into where not exists using sqlalchemy's INSERT from SELECT