In Sqlalchemy, a model instance is constantly connected to a session. If the session is ended, I won't be able to read the object. But in many cases, I want to close the session early to return resources, meanwhile still using the model instance.

Currently, I am reading all the values out and put them into a **dict**. But I am looking for a easier and automatic way.