Popular recipes tagged "pickle" but not "python3"http://code.activestate.com/recipes/tags/pickle-python3/2016-06-29T20:09:44-07:00ActiveState Code Recipesconvert hierarchy of data files into a convenient Python dictionary (Python)
2016-06-29T20:09:44-07:00Brian Fiedlerhttp://code.activestate.com/recipes/users/4194196/http://code.activestate.com/recipes/580687-convert-hierarchy-of-data-files-into-a-convenient-/
<p style="color: grey">
Python
recipe 580687
by <a href="/recipes/users/4194196/">Brian Fiedler</a>
(<a href="/recipes/tags/pickle/">pickle</a>).
Revision 2.
</p>
<p>Converts the CRUTEM text data files into a convenient Python dictionary.
The data files are at:
<a href="http://www.metoffice.gov.uk/hadobs/crutem4/data/station_files/CRUTEM.4.4.0.0.station_files.zip" rel="nofollow">http://www.metoffice.gov.uk/hadobs/crutem4/data/station_files/CRUTEM.4.4.0.0.station_files.zip</a></p>
Save and restore SHA-512 internal state (Python)
2013-03-03T18:05:42-08:00Dima Tisnekhttp://code.activestate.com/recipes/users/4068698/http://code.activestate.com/recipes/578479-save-and-restore-sha-512-internal-state/
<p style="color: grey">
Python
recipe 578479
by <a href="/recipes/users/4068698/">Dima Tisnek</a>
(<a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/inner/">inner</a>, <a href="/recipes/tags/pickle/">pickle</a>, <a href="/recipes/tags/restore/">restore</a>, <a href="/recipes/tags/sha512/">sha512</a>, <a href="/recipes/tags/state/">state</a>).
</p>
<p>If you have a very long input to hash, you may want to save your progress.</p>
<p>CPython doesn't normally let you, but it's easy to hack around via ctypes</p>
Mixin for pickling objects with __slots__ (Python)
2013-01-21T08:55:57-08:00Oren Tiroshhttp://code.activestate.com/recipes/users/2033964/http://code.activestate.com/recipes/578433-mixin-for-pickling-objects-with-__slots__/
<p style="color: grey">
Python
recipe 578433
by <a href="/recipes/users/2033964/">Oren Tirosh</a>
(<a href="/recipes/tags/pickle/">pickle</a>, <a href="/recipes/tags/unpickle/">unpickle</a>, <a href="/recipes/tags/__slots__/">__slots__</a>).
</p>
<p>This mixin makes it possible to pickle/unpickle objects with __slots__ defined. </p>
JSON instead of pickle for memcached (Python)
2012-01-10T22:31:36-08:00pavelhttp://code.activestate.com/recipes/users/4171837/http://code.activestate.com/recipes/578011-json-instead-of-pickle-for-memcached/
<p style="color: grey">
Python
recipe 578011
by <a href="/recipes/users/4171837/">pavel</a>
(<a href="/recipes/tags/cache/">cache</a>, <a href="/recipes/tags/json/">json</a>, <a href="/recipes/tags/memcache/">memcache</a>, <a href="/recipes/tags/memcached/">memcached</a>, <a href="/recipes/tags/pickle/">pickle</a>).
</p>
<p>Standard memcache client uses pickle as a serialization format. It can be handy to use json, especially when another component (e.g. backend) does'n know pickle, but json yes.</p>
Pickle to/from socket (Python)
2011-04-19T22:22:53-07:00pavelhttp://code.activestate.com/recipes/users/4171837/http://code.activestate.com/recipes/577667-pickle-tofrom-socket/
<p style="color: grey">
Python
recipe 577667
by <a href="/recipes/users/4171837/">pavel</a>
(<a href="/recipes/tags/pickle/">pickle</a>, <a href="/recipes/tags/socket/">socket</a>).
Revision 2.
</p>
<p>It's useful for transfering objects through socket, when doing communication between processes or networking.</p>
Serialize and Deserialize Securely (Python)
2009-11-04T19:57:41-08:00Eric Pruitthttp://code.activestate.com/recipes/users/4170757/http://code.activestate.com/recipes/576943-serialize-and-deserialize-securely/
<p style="color: grey">
Python
recipe 576943
by <a href="/recipes/users/4170757/">Eric Pruitt</a>
(<a href="/recipes/tags/cpickle/">cpickle</a>, <a href="/recipes/tags/pickle/">pickle</a>, <a href="/recipes/tags/serialize/">serialize</a>).
Revision 19.
</p>
<p>A serialization library to serialize some of the more basic types. Does not suffer from the security flaws that cPickle and pickle do.</p>
SyncFiles (Python)
2008-12-13T21:28:57-08:00Collin Stockshttp://code.activestate.com/recipes/users/4149235/http://code.activestate.com/recipes/576584-syncfiles/
<p style="color: grey">
Python
recipe 576584
by <a href="/recipes/users/4149235/">Collin Stocks</a>
(<a href="/recipes/tags/backup/">backup</a>, <a href="/recipes/tags/consistency/">consistency</a>, <a href="/recipes/tags/files/">files</a>, <a href="/recipes/tags/gnu/">gnu</a>, <a href="/recipes/tags/gpl/">gpl</a>, <a href="/recipes/tags/just_in_case/">just_in_case</a>, <a href="/recipes/tags/oop/">oop</a>, <a href="/recipes/tags/pickle/">pickle</a>, <a href="/recipes/tags/state_machine/">state_machine</a>, <a href="/recipes/tags/storage/">storage</a>, <a href="/recipes/tags/sync/">sync</a>, <a href="/recipes/tags/synchronize/">synchronize</a>).
Revision 3.
</p>
<p>This module allows you to handle and protect from inconsistencies sets of files that must all be saved at the same time. It does this be creating backups and temporary files. It has been moderately tested for bugs.</p>