Debian Codegraph @

docs/extensions.rst

raw
1 =====================
2 jsonpickle extensions
3 =====================
4
5 NumPy
6 -----
7 jsonpickle includes a built-in numpy extension. If would like to encode
8 sklearn models, numpy arrays, and other numpy-based data then you must
9 enable the numpy extension by registering its handlers::
10
11 >>> import jsonpickle.ext.numpy as jsonpickle_numpy
12 >>> jsonpickle_numpy.register_handlers()
13
14 Ecdsa
15 -----
16 For the ecdsa module's keys, when trying to serialize them with
17 ``gmpy2`` installed, jsonpickle will error unless the ``gmpy``
18 handlers are registered:
19
20 >>> import jsonpickle.ext.gmpy as jsonpickle_gmpy
21 >>> jsonpickle_gmpy.register_handlers()