| Trees | Indices | Help |
|
|---|
|
|
|
|||
|
frozenset Cerealizer -- A secure Pickle-like module The interface of the Cerealizer module is similar to Pickle, and it supports __getstate__, __setstate__, __getinitargs__ and __getnewargs__. |
|||
| NotCerealizerFileError | |||
| NonCerealizableObjectError | |||
| Dumper | |||
|
Handler Handler |
|||
| RefHandler | |||
| NoneHandler | |||
| StrHandler | |||
| UnicodeHandler | |||
| BoolHandler | |||
| IntHandler | |||
| LongHandler | |||
| FloatHandler | |||
| ComplexHandler | |||
| TupleHandler | |||
| FrozensetHandler | |||
| ListHandler | |||
| SetHandler | |||
| DictHandler | |||
|
ObjHandler ObjHandler |
|||
|
SlotedObjHandler SlotedObjHandler |
|||
|
InitArgsObjHandler InitArgsObjHandler |
|||
|
NewArgsObjHandler NewArgsObjHandler |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
set = sets.Set
|
|||
__alls__ =
|
|||
VERSION =
|
|||
logger = logging.getLogger("cerealizer")
|
|||
_configurable = 1
|
|||
_HANDLERS =
|
|||
_HANDLERS_ =
|
|||
|
|||
register(Class, handler = None, classname = "") Registers CLASS as a serializable and secure class. By calling register, YOU HAVE TO ASSUME THAT THE FOLLOWING METHODS ARE SECURE:
HANDLER is the Cerealizer Handler object that handles serialization and deserialization for Class. If not given, Cerealizer create an instance of ObjHandler, which is suitable for old-style and new_style Python class, and also C-defined types (although if it has some C-side data, you may have to write a custom Handler or a __getstate__ and __setstate__ pair). CLASSNAME is the classname used in Cerealizer files. It defaults to the full classname (module.class) but you may choose something shorter -- as long as there is no risk of name clash. |
register(Class, handler = None, classname = "") Registers CLASS as a serializable and secure class. By calling register, YOU HAVE TO ASSUME THAT THE FOLLOWING METHODS ARE SECURE:
HANDLER is the Cerealizer Handler object that handles serialization and deserialization for Class. If not given, Cerealizer create an instance of ObjHandler, which is suitable for old-style and new_style Python class, and also C-defined types (although if it has some C-side data, you may have to write a custom Handler or a __getstate__ and __setstate__ pair). CLASSNAME is the classname used in Cerealizer files. It defaults to the full classname (module.class) but you may choose something shorter -- as long as there is no risk of name clash. |
Registers ALIAS as an alias classname for CLASS.
Usefull for keeping backward compatibility in files: e.g. if you have renamed OldClass to
NewClass, just do:
cerealizer.register_alias(NewClass, "OldClass")
and you'll be able to open old files containing OldClass serialized.
|
|
dump(obj, file, protocol = 0) Serializes object OBJ in FILE. PROTOCOL is unused, it exists only for compatibility with Pickle. |
|
dumps(obj, protocol = 0) -> str Serializes object OBJ and returns the serialized string. PROTOCOL is unused, it exists only for compatibility with Pickle. |
|
|
|||
__alls__
|
_HANDLERS
|
_HANDLERS_
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Sat Oct 20 15:25:02 2007 | http://epydoc.sourceforge.net |