Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Classe « InstanceEvents »

Méthode sqlalchemy.orm.InstanceEvents.unpickle

Signature de la méthode unpickle

def unpickle(self, target, state_dict) 

Description

unpickle.__doc__

Receive an object instance after its associated state has
been unpickled.

.. container:: event_signatures

     Example argument forms::

        from sqlalchemy import event


        @event.listens_for(SomeClass, 'unpickle')
        def receive_unpickle(target, state_dict):
            "listen for the 'unpickle' event"

            # ... (event handling logic) ...


:param target: the mapped instance.  If
 the event is configured with ``raw=True``, this will
 instead be the :class:`.InstanceState` state-management
 object associated with the instance.
:param state_dict: the dictionary sent to
 :class:`.InstanceState.__setstate__`, containing the state
 dictionary which was pickled.