anyconfig.backend.pickle
¶
Pickle backend:
- Format to support: Pickle
- Requirements: It should be available always.
- pickle/cPickle in python 2 standard library: https://docs.python.org/2/library/pickle.html
- pickle in python 3 standard library: https://docs.python.org/3/library/pickle.html
- Development Status :: 4 - Beta
- Limitations: None obvious
- Special options: All options of pickle.{load{s,},dump{s,}} should work.
Changelog:
New in version 0.8.3.
-
class
anyconfig.backend.pickle.
Parser
¶ Bases:
anyconfig.backend.base.StringStreamFnParser
,anyconfig.backend.base.BinaryFilesMixin
Parser for Pickle files.
-
_type
= 'pickle'¶
-
_extensions
= ['pkl', 'pickle']¶
-
_load_opts
= []¶
-
_dump_opts
= ['protocol']¶
-
_load_from_string_fn
(*args, **kwargs)¶ loads(string) – Load a pickle from the given string
-
_load_from_stream_fn
(*args, **kwargs)¶ load(file) – Load a pickle from the given file
-
__module__
= 'anyconfig.backend.pickle'¶
-
_dump_to_string_fn
(*args, **kwargs)¶ dumps(obj, protocol=0) – Return a string containing an object in pickle format.
See the Pickler docstring for the meaning of optional argument proto.
-
_dump_to_stream_fn
(*args, **kwargs)¶ dump(obj, file, protocol=0) – Write an object in pickle format to the given file.
See the Pickler docstring for the meaning of optional argument proto.
-