from sqlalchemy import text
conn=engine.connect();
s=text("insert into aws_rcsy(topic)values(:topic)");
q_insert=conn.execute(s,topic=topic);
conn.close();
How to get the id of the data just inserted?
ps:q_insert returns <sqlalchemy.engine.base.ResultProxy object at 0x...>
Can row data be obtained from q_insert?
q.lastrowid
The code copied has not been verified
Reference stack-overflow