ORM Internals — SQLAlchemy 1.4 Documentation
docs.sqlalchemy.org › en › latestReturn a namespace representing each attribute on the mapped object, including its current value and history. The returned object is an instance of AttributeState. This object allows inspection of the current data within an attribute as well as attribute history since the last flush. attribute sqlalchemy.orm.InstanceState. callables = ¶
ORM Internals — SQLAlchemy 1.4 Documentation
docs.sqlalchemy.org/en/latest/orm/internals.htmlThe InstanceState.deleted attribute refers to a specific state of the object that occurs between the “persistent” and “detached” states; once the object is detached, the InstanceState.deleted attribute no longer returns True; in order to detect that a state was deleted, regardless of whether or not the object is associated with a Session, use the InstanceState.was_deleted accessor.