pkgsrc-wip/py-serialize/DESCR

24 lines
801 B
Plaintext

TODO: Adjust the following lines from README
Serialize: A common Python API for multiple serialization formats
=================================================================
There are multiple serialization formats out there ...
... and great packages to use them.
But they all have a different API and switching among them is not so simple
as it should be. Serialize helps you to do it, including dealing with custom
classes. Let's dump a dict using the `pickle` format:
.. code-block:: python
>>> from serialize import dumps, loads
>>> dumps(dict(answer=42), fmt='pickle')
b'\x80\x03}q\x00X\x06\x00\x00\x00answerq\x01K*s.'
>>> loads(_, fmt='pickle')
{'answer': 42}
And here comes the cool thing, you can just change the serialization format
...