I am using SQLAlchemy without the ORM, i.e. using hand crafted SQL statememts to directly interact with the backend db. I am using PG as my backend db (psycopg2 as DB driver) in
result.inserted_primary_key
Worked for me. The only thing to note is that this returns a list that contains that last_insert_id.