|
1 | | -dill |
2 | | -==== |
3 | | -serialize all of python |
4 | | - |
5 | | -About Dill |
6 | | ----------- |
7 | | -Dill extends python's 'pickle' module for serializing and de-serializing |
8 | | -python objects to the majority of the built-in python types. Serialization |
9 | | -is the process of converting an object to a byte stream, and the inverse |
10 | | -of which is converting a byte stream back to on python object hierarchy. |
11 | | - |
12 | | -Dill provides the user the same interface as the 'pickle' module, and |
13 | | -also includes some additional features. In addition to pickling python |
14 | | -objects, dill provides the ability to save the state of an interpreter |
15 | | -session in a single command. Hence, it would be feasable to save a |
16 | | -interpreter session, close the interpreter, ship the pickled file to |
17 | | -another computer, open a new interpreter, unpickle the session and |
18 | | -thus continue from the 'saved' state of the original interpreter |
19 | | -session. |
20 | | - |
21 | | -Dill can be used to store python objects to a file, but the primary |
22 | | -usage is to send python objects across the network as a byte stream. |
23 | | -Dill is quite flexible, and allows arbitrary user defined classes |
24 | | -and funcitons to be serialized. Thus dill is not intended to be |
25 | | -secure against erroneously or maliciously constructed data. It is |
26 | | -left to the user to decide whether the data they unpickle is from |
27 | | -a trustworthy source. |
28 | | - |
29 | | -Dill is part of pathos, a python framework for heterogeneous computing. |
30 | | -Dill is in active development, so any user feedback, bug reports, comments, |
31 | | -or suggestions are highly appreciated. A list of known issues is maintained |
32 | | -at http://trac.mystic.cacr.caltech.edu/project/pathos/query, with a public |
33 | | -ticket list at https://github.com/uqfoundation/dill/issues. |
34 | | - |
35 | | - |
36 | | -Major Features |
37 | | --------------- |
38 | | -Dill can pickle the following standard types:: |
39 | | - |
40 | | -* none, type, bool, int, long, float, complex, str, unicode, |
41 | | -* tuple, list, dict, file, buffer, builtin, |
42 | | -* both old and new style classes, |
43 | | -* instances of old and new style classes, |
44 | | -* set, frozenset, array, functions, exceptions |
45 | | - |
46 | | -Dill can also pickle more 'exotic' standard types:: |
47 | | - |
48 | | -* functions with yields, nested functions, lambdas |
49 | | -* cell, method, unboundmethod, module, code, methodwrapper, |
50 | | -* dictproxy, methoddescriptor, getsetdescriptor, memberdescriptor, |
51 | | -* wrapperdescriptor, xrange, slice, |
52 | | -* notimplemented, ellipsis, quit |
53 | | - |
54 | | -Dill cannot yet pickle these standard types:: |
55 | | - |
56 | | -* frame, generator, traceback |
57 | | - |
58 | | -Dill also provides the capability to:: |
59 | | - |
60 | | -* save and load python interpreter sessions |
61 | | -* save and extract the source code from functions and classes |
62 | | -* interactively diagnose pickling errors |
63 | | - |
64 | | - |
65 | | -Current Release |
66 | | ---------------- |
67 | | -The latest stable release of dill is available from:: |
68 | | - http://trac.mystic.cacr.caltech.edu/project/pathos |
69 | | - |
70 | | -or:: |
71 | | - https://github.com/uqfoundation/dill/releases |
72 | | - |
73 | | -or also:: |
74 | | - https://pypi.python.org/pypi/dill |
75 | | - |
76 | | -Dill is distributed under a 3-clause BSD license. |
77 | | - |
78 | | - |
79 | | -Development Version |
80 | | -------------------- |
81 | | -You can get the latest development version with all the shiny new features at:: |
82 | | - https://github.com/uqfoundation |
83 | | - |
84 | | -Feel free to fork the github mirror of our svn trunk. If you have a new |
85 | | -contribution, please submit a pull request. |
86 | | - |
87 | | - |
88 | | -More Information |
89 | | ----------------- |
90 | | -Probably the best way to get started is to look at the tests that are |
91 | | -provide within dill. See `dill.tests` for a set of scripts that demonstrate |
92 | | -dill's ability to serialize different python objects. Since dill conforms |
93 | | -to the 'pickle' interface, the examples and documentation at |
94 | | -http://docs.python.org/library/pickle.html also apply to dill if one will |
95 | | -`import dill as pickle`. The source code is also generally well documented, |
96 | | -so further questions may be resolved by inspecting the code itself. Please |
97 | | -also feel free to submit a ticket on github, or ask a question on |
98 | | -stackoverflow (@Mike McKerns). |
99 | | - |
100 | | -Dill is an active research tool. There are a growing number of publications |
101 | | -and presentations that discuss real-world examples and new features of dill |
102 | | -in greater detail than presented in the user's guide. If you would like to |
103 | | -share how you use dill in your work, please post a link or send an email |
104 | | -(to mmckerns at caltech dot edu). |
105 | | - |
106 | | - |
107 | | -Citation |
108 | | --------- |
109 | | -If you use dill to do research that leads to publication, we ask that you |
110 | | -acknowledge use of dill by citing the following in your publication:: |
111 | | - |
112 | | - M.M. McKerns, L. Strand, T. Sullivan, A. Fang, M.A.G. Aivazis, |
113 | | - "Building a framework for predictive science", Proceedings of |
114 | | - the 10th Python in Science Conference, 2011; |
115 | | - http://arxiv.org/pdf/1202.1056 |
116 | | - |
117 | | - Michael McKerns and Michael Aivazis, |
118 | | - "pathos: a framework for heterogeneous computing", 2010- ; |
119 | | - http://dev.danse.us/trac/pathos |
120 | | - |
121 | | -Please see http://trac.mystic.cacr.caltech.edu/project/pathos or |
122 | | -http://arxiv.org/pdf/1202.1056 for further information. |
123 | | - |
| 1 | +----------------------------- |
| 2 | +dill: serialize all of python |
| 3 | +----------------------------- |
| 4 | + |
| 5 | +About Dill |
| 6 | +========== |
| 7 | + |
| 8 | +Dill extends python's 'pickle' module for serializing and de-serializing |
| 9 | +python objects to the majority of the built-in python types. Serialization |
| 10 | +is the process of converting an object to a byte stream, and the inverse |
| 11 | +of which is converting a byte stream back to on python object hierarchy. |
| 12 | + |
| 13 | +Dill provides the user the same interface as the 'pickle' module, and |
| 14 | +also includes some additional features. In addition to pickling python |
| 15 | +objects, dill provides the ability to save the state of an interpreter |
| 16 | +session in a single command. Hence, it would be feasable to save a |
| 17 | +interpreter session, close the interpreter, ship the pickled file to |
| 18 | +another computer, open a new interpreter, unpickle the session and |
| 19 | +thus continue from the 'saved' state of the original interpreter |
| 20 | +session. |
| 21 | + |
| 22 | +Dill can be used to store python objects to a file, but the primary |
| 23 | +usage is to send python objects across the network as a byte stream. |
| 24 | +Dill is quite flexible, and allows arbitrary user defined classes |
| 25 | +and funcitons to be serialized. Thus dill is not intended to be |
| 26 | +secure against erroneously or maliciously constructed data. It is |
| 27 | +left to the user to decide whether the data they unpickle is from |
| 28 | +a trustworthy source. |
| 29 | + |
| 30 | +Dill is part of pathos, a python framework for heterogeneous computing. |
| 31 | +Dill is in active development, so any user feedback, bug reports, comments, |
| 32 | +or suggestions are highly appreciated. A list of known issues is maintained |
| 33 | +at http://trac.mystic.cacr.caltech.edu/project/pathos/query, with a public |
| 34 | +ticket list at https://github.com/uqfoundation/dill/issues. |
| 35 | + |
| 36 | + |
| 37 | +Major Features |
| 38 | +============== |
| 39 | + |
| 40 | +Dill can pickle the following standard types:: |
| 41 | + |
| 42 | + - none, type, bool, int, long, float, complex, str, unicode, |
| 43 | + - tuple, list, dict, file, buffer, builtin, |
| 44 | + - both old and new style classes, |
| 45 | + - instances of old and new style classes, |
| 46 | + - set, frozenset, array, functions, exceptions |
| 47 | + |
| 48 | +Dill can also pickle more 'exotic' standard types:: |
| 49 | + |
| 50 | + - functions with yields, nested functions, lambdas, |
| 51 | + - cell, method, unboundmethod, module, code, methodwrapper, |
| 52 | + - dictproxy, methoddescriptor, getsetdescriptor, memberdescriptor, |
| 53 | + - wrapperdescriptor, xrange, slice, |
| 54 | + - notimplemented, ellipsis, quit |
| 55 | + |
| 56 | +Dill cannot yet pickle these standard types:: |
| 57 | + |
| 58 | + - frame, generator, traceback |
| 59 | + |
| 60 | +Dill also provides the capability to:: |
| 61 | + |
| 62 | + - save and load python interpreter sessions |
| 63 | + - save and extract the source code from functions and classes |
| 64 | + - interactively diagnose pickling errors |
| 65 | + |
| 66 | + |
| 67 | +Current Release |
| 68 | +=============== |
| 69 | + |
| 70 | +The latest stable version of dill is available from:: |
| 71 | + |
| 72 | + https://pypi.python.org/pypi/dill |
| 73 | + |
| 74 | +or:: |
| 75 | + |
| 76 | + https://github.com/uqfoundation/dill/releases |
| 77 | + |
| 78 | +Dill is distributed under a 3-clause BSD license. |
| 79 | + |
| 80 | + >>> import dill |
| 81 | + >>> print (dill.license()) |
| 82 | + |
| 83 | + |
| 84 | +Development Version |
| 85 | +=================== |
| 86 | + |
| 87 | +You can get the latest development version with all the shiny new features at:: |
| 88 | + |
| 89 | + https://github.com/uqfoundation |
| 90 | + |
| 91 | +Feel free to fork the github mirror of our svn trunk. If you have a new |
| 92 | +contribution, please submit a pull request. |
| 93 | + |
| 94 | + |
| 95 | +Requirements |
| 96 | +============ |
| 97 | + |
| 98 | +Dill requires:: |
| 99 | + |
| 100 | + - python2, version >= 2.5 *or* python3, version >= 3.1 |
| 101 | + |
| 102 | +Optional requirements:: |
| 103 | + |
| 104 | + - numpy, version >= 1.6 |
| 105 | + - objgraph, version >= 1.7.2 |
| 106 | + |
| 107 | + |
| 108 | +More Information |
| 109 | +================ |
| 110 | + |
| 111 | +Probably the best way to get started is to look at the tests that are |
| 112 | +provided within dill. See `dill.tests` for a set of scripts that demonstrate |
| 113 | +dill's ability to serialize different python objects. Since dill conforms |
| 114 | +to the 'pickle' interface, the examples and documentation at |
| 115 | +http://docs.python.org/library/pickle.html also apply to dill if one will |
| 116 | +`import dill as pickle`. The source code is also generally well |
| 117 | +documented, so further questions may be resolved by inspecting the code |
| 118 | +itself. Please also feel free to submit a ticket on github, or ask a |
| 119 | +question on stackoverflow (@Mike McKerns). |
| 120 | + |
| 121 | +Dill is an active research tool. There are a growing number of publications |
| 122 | +and presentations that discuss real-world examples and new features of dill |
| 123 | +in greater detail than presented in the user's guide. If you would like to |
| 124 | +share how you use dill in your work, please post a link or send an email |
| 125 | +(to mmckerns at caltech dot edu). |
| 126 | + |
| 127 | + |
| 128 | +Citation |
| 129 | +======== |
| 130 | + |
| 131 | +If you use dill to do research that leads to publication, we ask that you |
| 132 | +acknowledge use of dill by citing the following in your publication:: |
| 133 | + |
| 134 | + M.M. McKerns, L. Strand, T. Sullivan, A. Fang, M.A.G. Aivazis, |
| 135 | + "Building a framework for predictive science", Proceedings of |
| 136 | + the 10th Python in Science Conference, 2011; |
| 137 | + http://arxiv.org/pdf/1202.1056 |
| 138 | + |
| 139 | + Michael McKerns and Michael Aivazis, |
| 140 | + "pathos: a framework for heterogeneous computing", 2010- ; |
| 141 | + http://trac.mystic.cacr.caltech.edu/project/pathos |
| 142 | + |
| 143 | +Please see http://trac.mystic.cacr.caltech.edu/project/pathos or |
| 144 | +http://arxiv.org/pdf/1202.1056 for further information. |
| 145 | + |
0 commit comments