you can work with multiple sessions and their objects simultaneously, with the provision that you don't add() an object from one session directly into the other one, without detaching it from the original session first. to transfer the state of an object from one session to another without detaching it, use the session.merge() method.
more important is that when you work with these sessions, the sessions are not being simultaneously accessed by other concurrent tasks such as those in other threads, greenlets or async coroutines. if the two sessions are local to the current task/thread/whatever, just keep track of which objects are from which and it will be fine.