anyconfig.backend.msgpack
¶
MessagePack backend:
- Format to support: MessagePack, http://msgpack.org
- Requirements: msgpack-python, https://pypi.python.org/pypi/msgpack-python
- Development Status :: 4 - Beta
- Limitations: None obvious
- Special options:
- All options of msgpack.load{s,} and msgpack.dump{s,} except object_hook and file_like should work.
- See also: http://pythonhosted.org/msgpack-python/api.html
Changelog:
New in version 0.0.11.
-
class
anyconfig.backend.msgpack.
Parser
¶ Bases:
anyconfig.backend.base.StringStreamFnParser
,anyconfig.backend.base.BinaryFilesMixin
Loader/Dumper for MessagePack files.
-
_type
= 'msgpack'¶
-
_extensions
= []¶
-
_load_opts
= ['read_size', 'use_list', 'object_hook', 'list_hook', 'encoding', 'unicode_errors', 'max_buffer_size', 'ext_hook', 'max_str_len', 'max_bin_len', 'max_array_len', 'max_map_len', 'max_ext_len', 'object_pairs_hook']¶
-
_dump_opts
= ['default', 'encoding', 'unicode_errors', 'use_single_float', 'autoreset', 'use_bin_type']¶
-
_ordered
= True¶
-
_dict_opts
= ['object_pairs_hook']¶
-
_load_from_string_fn
(*args, **kwargs)¶ unpackb(packed, object_hook=None, list_hook=None, bool use_list=1, encoding=None, unicode_errors=’strict’, object_pairs_hook=None, ext_hook=ExtType, Py_ssize_t max_str_len=2147483647, Py_ssize_t max_bin_len=2147483647, Py_ssize_t max_array_len=2147483647, Py_ssize_t max_map_len=2147483647, Py_ssize_t max_ext_len=2147483647)
Unpack packed_bytes to object. Returns an unpacked object.
Raises ValueError when packed contains extra bytes.
See
Unpacker
for options.
-
_load_from_stream_fn
(*args, **kwargs)¶ unpack(stream, object_hook=None, list_hook=None, bool use_list=1, encoding=None, unicode_errors=’strict’, object_pairs_hook=None, ext_hook=ExtType, Py_ssize_t max_str_len=2147483647, Py_ssize_t max_bin_len=2147483647, Py_ssize_t max_array_len=2147483647, Py_ssize_t max_map_len=2147483647, Py_ssize_t max_ext_len=2147483647)
Unpack an object from stream.
Raises ValueError when stream has extra bytes.
See
Unpacker
for options.
-
_dump_to_string_fn
(*args, **kwargs)¶ Pack object o and return packed bytes
See
Packer
for options.
-
_dump_to_stream_fn
(*args, **kwargs)¶ Pack object o and write it to stream
See
Packer
for options.
-
__module__
= 'anyconfig.backend.msgpack'¶
-