Serialize

class psynet.serialize.DominateHandler(context)[source]

Bases: BaseHandler

The DominateHandler class

flatten(obj, state)[source]

Flatten obj into a json-friendly form and write result to data.

Parameters:
  • obj (object) – The object to be serialized.

  • data (dict) – A partially filled dictionary which will contain the json-friendly representation of obj once this method has finished.

class psynet.serialize.NoJSONHandler(context)[source]

Bases: BaseHandler

The NoJSONHandler class

flatten(obj, state)[source]

Flatten obj into a json-friendly form and write result to data.

Parameters:
  • obj (object) – The object to be serialized.

  • data (dict) – A partially filled dictionary which will contain the json-friendly representation of obj once this method has finished.

restore(state)[source]

Restore an object of the registered type from the json-friendly representation obj and return it.

class psynet.serialize.PsyNetUnpickler(backend=None, keys=False, safe=True, v1_decode=False, on_missing='ignore', handle_readonly=False)[source]

Bases: Unpickler

The PsyNetUnpickler class

class psynet.serialize.SQLHandler(context)[source]

Bases: BaseHandler

The SQLHandler class

flatten(obj, state)[source]

Flatten obj into a json-friendly form and write result to data.

Parameters:
  • obj (object) – The object to be serialized.

  • data (dict) – A partially filled dictionary which will contain the json-friendly representation of obj once this method has finished.

restore(state)[source]

Restore an object of the registered type from the json-friendly representation obj and return it.