<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-8152470182944970248</atom:id><lastBuildDate>Wed, 13 Jan 2010 07:31:45 +0000</lastBuildDate><title>7 Oars</title><description>"It is the triumph of a rowing stroke based on scientific principles over a stroke governed merely by a knowledge of the handling of an oar..."  ~New York Times - May 25, 1890</description><link>http://blog.7oars.com/</link><managingEditor>noreply@blogger.com (John)</managingEditor><generator>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/7oars" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="7oars" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8152470182944970248.post-3669307673483565347</guid><pubDate>Sat, 10 Jan 2009 21:29:00 +0000</pubDate><atom:updated>2009-01-10T15:30:46.357-06:00</atom:updated><title>Announcing jsonpickle-0.2.0</title><description>jsonpickle 0.2.0 has been tagged and &lt;a href="http://code.google.com/p/jsonpickle/downloads/list"&gt;released&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There are a huge number of changes improving jsonpickle's ability to work with other Python objects.&lt;br /&gt;&lt;br /&gt;David Aguilar also added a superb json backend loader that allows the user to specify which json module to use (simplejson, demjson, cjson, json).&lt;br /&gt;&lt;br /&gt;Please check out the new &lt;a href=" http://jsonpickle.googlecode.com/svn/docs/index.html"&gt;documentation&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks so much everyone who submitted issues to the mailing list and contributed time and effort!&lt;br /&gt;&lt;br /&gt;John&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8152470182944970248-3669307673483565347?l=blog.7oars.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.7oars.com/2009/01/announcing-jsonpickle-020.html</link><author>noreply@blogger.com (John)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8152470182944970248.post-3692198684565917866</guid><pubDate>Sat, 10 Jan 2009 20:10:00 +0000</pubDate><atom:updated>2009-01-10T14:17:37.129-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">python</category><category domain="http://www.blogger.com/atom/ns#">stopwatch</category><title>Announcing stopwatch 0.3.1</title><description>There is a new release of &lt;a href="http://code.google.com/p/7oars/wiki/StopWatch"&gt;stopwatch&lt;/a&gt;, a simple utility for measuring time in Python.  The release addes a simple decorator for functions to print the execution time of each call to that function.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;&gt;&gt; from stopwatch import clockit&lt;br /&gt;&gt;&gt;&gt; @clockit&lt;br /&gt;   def multiply(a, b):&lt;br /&gt;       return a * b&lt;br /&gt;&gt;&gt;&gt; r = multiple(4, 5)&lt;br /&gt;multiple in 1.38282775879e-05 sec&lt;br /&gt;&gt;&gt;&gt; print r&lt;br /&gt;20&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You can obtain the new release with easy_install&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;easy_install -U stopwatch&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or &lt;a href="http://code.google.com/p/7oars/downloads/list"&gt;download&lt;/a&gt; the appropriate release.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8152470182944970248-3692198684565917866?l=blog.7oars.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.7oars.com/2009/01/announcing-stopwatch-031.html</link><author>noreply@blogger.com (John)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8152470182944970248.post-2915896756274378862</guid><pubDate>Sat, 10 Jan 2009 05:07:00 +0000</pubDate><atom:updated>2009-01-10T14:18:03.710-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">python-hl7</category><category domain="http://www.blogger.com/atom/ns#">python</category><category domain="http://www.blogger.com/atom/ns#">hl7</category><title>Announcing python-hl7</title><description>&lt;a href="http://www.bitbucket.org/johnpaulett/python-hl7/wiki/Home"&gt;python-hl7&lt;/a&gt; is a simple Python library for parsing Health Level 7 version 2.x messages.  The library allows for easy, key-based access of all the elements in an HL7 message.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/HL7"&gt;HL7&lt;/a&gt; is a communication protocol and message format for health care data. It is the de facto standard for transmitting data between clinical information systems and between clinical devices. The version 2.x series, which is often is a pipe delimited format is currently the most widely accepted version of HL7 (version 3.0 is an XML-based format).&lt;br /&gt;&lt;br /&gt;The current implementation of python-hl7 does not completely follow the &lt;a href="http://www.hl7.org"&gt;HL7 specification&lt;/a&gt;, but is good enough to parse the most commonly seen HL7 messages. The library could potentially evolve into being fully complainant with the spec. The library could eventually also contain the ability to create HL7 v2.x messages.&lt;br /&gt;&lt;br /&gt;As an example, let's create a HL7 message:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&gt;&gt;&gt; message = 'MSH|^~\&amp;amp;|GHH LAB|ELAB-3|GHH OE|BLDG4|200202150930||ORU^R01|CNTRL-3456|P|2.4\r'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&gt;&gt;&gt; message += 'PID|||555-44-4444||EVERYWOMAN^EVE^E^^^^L|JONES|196203520|F|||153 FERNWOOD DR.^^STATESVILLE^OH^35292||(206)3345232|(206)752-121||||AC555444444||67-A4335^OH^20030520\r'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&gt;&gt;&gt; message += 'OBR|1|845439^GHH OE|1045813^GHH LAB|1554-5^GLUCOSE|||200202150730||||||||555-55-5555^PRIMARY^PATRICIA P^^^^MD^^LEVEL SEVEN HEALTHCARE, INC.|||||||||F||||||444-44-4444^HIPPOCRATES^HOWARD H^^^^MD\r'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&gt;&gt;&gt; message += 'OBX|1|SN|1554-5^GLUCOSE^POST 12H CFST:MCNC:PT:SER/PLAS:QN||^182|mg/dl|70_105|H|||F\r'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We call the hl7.parse() command with string message:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&gt;&gt;&gt; import hl7&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&gt;&gt;&gt; h = hl7.parse(message)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We get a n-dimensional list back:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&gt;&gt;&gt; type(h)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;type&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There were 4 segments (MSH, PID, OBR, OBX):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&gt;&gt;&gt; len(h)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We can extract individual elements of the message:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&gt;&gt;&gt; h[3][3][1]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'GLUCOSE'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&gt;&gt;&gt; h[3][5][1]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'182'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We can look up segments by the segment identifer:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&gt;&gt;&gt; pid = hl7.segment('PID', h)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&gt;&gt;&gt; pid[3][0]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'555-44-4444'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Download&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;python-hl7 will work with Python 2.5, 2.6, and 3.0. It is under a BSD license.&lt;br /&gt;&lt;br /&gt;The easiest way to obtain the package is with easy_install&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;easy_install hl7&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;An egg and tar.gz file can be downloaded from &lt;a href="http://pypi.python.org/pypi/hl7/"&gt;PyPi&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can always clone or fork the source:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hg clone http://bitbucket.org/johnpaulett/python-hl7/&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8152470182944970248-2915896756274378862?l=blog.7oars.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.7oars.com/2009/01/announcing-python-hl7.html</link><author>noreply@blogger.com (John)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8152470182944970248.post-2219332014266811081</guid><pubDate>Fri, 22 Aug 2008 04:55:00 +0000</pubDate><atom:updated>2008-08-22T00:11:22.744-05:00</atom:updated><title>jsonpickle 0.1.0 released</title><description>Thanks to Adam for finding the bug that missed longs as a primitive type.&lt;br /&gt;&lt;br /&gt;In addition to that quick bugfix, jsonpickle has undergone a major API change.  At the core of this change is jsonpickle's new preference for python-cjson over simplejson.  While python-cjson is not a requirement, if it is installed on the machine, jsonpickle will use python-cjson.  python-cjson is faster for jsonpickle (see the &lt;a href="http://code.google.com/p/jsonpickle/wiki/Benchmarks"&gt;benchmarks&lt;/a&gt;), but simplejson is still useful on Google's App Engine.&lt;br /&gt;&lt;br /&gt;So the API change moves away from the load/loads/dump/dumps functions in the tradition of simplejson towards a simple encode/decode set of functions.  If you need to save the output or read a file, you can do that on your own, then send that data into the encode/decode methods.  While it may have been smart to deprecate these functions first, I want to get the API correct early on and prevent cruft.&lt;br /&gt;&lt;br /&gt;The update example:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;&gt;&gt; import jsonpickle&lt;br /&gt;&gt;&gt;&gt; from jsonpickle.tests.classes import Thing&lt;br /&gt;&lt;br /&gt;Create an object.&lt;br /&gt;&gt;&gt;&gt; obj = Thing('A String')&lt;br /&gt;&gt;&gt;&gt; print obj.name&lt;br /&gt;A String&lt;br /&gt;&lt;br /&gt;Use jsonpickle to transform the object into a JSON string.&lt;br /&gt;&gt;&gt;&gt; pickled = jsonpickle.encode(obj)&lt;br /&gt;&gt;&gt;&gt; print pickled&lt;br /&gt;{"classname__": "Thing", "child": null, "name": "A String", "classmodule__": "jsonpickle.tests.classes"}&lt;br /&gt;&lt;br /&gt;Use jsonpickle to recreate a Python object from a JSON string&lt;br /&gt;&gt;&gt;&gt; unpickled = jsonpickle.decode(pickled)&lt;br /&gt;&gt;&gt;&gt; print unpickled.name&lt;br /&gt;A String&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Grab the new &lt;a href="http://code.google.com/p/jsonpickle/"&gt;version&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Thanks also go out to the Joose developers for &lt;a href="http://joose-js.blogspot.com/2008/08/joose-now-supports-jsonpickle.html"&gt;integrating jsonpickle into their product&lt;/a&gt;!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8152470182944970248-2219332014266811081?l=blog.7oars.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.7oars.com/2008/08/jsonpickle-010-released.html</link><author>noreply@blogger.com (John)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8152470182944970248.post-4692102527884517946</guid><pubDate>Fri, 08 Aug 2008 22:00:00 +0000</pubDate><atom:updated>2008-08-08T17:00:12.087-05:00</atom:updated><title>Announcing stopwatch 0.3.0 and the 7 Oars code repository</title><description>The &lt;a href="http://code.google.com/p/7oars/"&gt;7 Oars code repository&lt;/a&gt; is a centralized location for small python programs and modules from 7 Oars, instead of having multiple wikis and source control systems for relatively small projects.&lt;br /&gt;&lt;br /&gt;The first module as part of the code repository is &lt;a href="http://code.google.com/p/7oars/wiki/StopWatch"&gt;stopwatch&lt;/a&gt;. stopwatch is a very simple python module for measuring time.  I typically use it to measure the execution time of specifc parts of code or data processing threads.  For example:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;&gt;&gt; import stopwatch&lt;br /&gt;&gt;&gt;&gt; t = stopwatch.Timer() # immediately starts the clock&lt;br /&gt;&gt;&gt;&gt; t.elapsed # elapsed time in seconds&lt;br /&gt;0.2&lt;br /&gt;&gt;&gt;&gt; t.elapsed&lt;br /&gt;1.6&lt;br /&gt;&gt;&gt;&gt; str(t) # pretty print&lt;br /&gt;1.8 sec&lt;br /&gt;&gt;&gt;&gt; for i in xrange(0, 10000)&lt;br /&gt;&gt;&gt;&gt;     pass&lt;br /&gt;&gt;&gt;&gt; t.elapsed # still going&lt;br /&gt;10.4&lt;br /&gt;&gt;&gt;&gt; t.stop() # stop the timer&lt;br /&gt;&gt;&gt;&gt; t.elapsed&lt;br /&gt;10.6&lt;br /&gt;&gt;&gt;&gt; t.elapsed # it will not go any more&lt;br /&gt;10.6&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Download: &lt;a href="http://code.google.com/p/7oars/downloads/list"&gt;http://code.google.com/p/7oars/downloads/list&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;via PyPi: &lt;pre&gt;easy_install -U stopwatch&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;via subversion: &lt;pre&gt;svn checkout http://7oars.googlecode.com/svn/trunk/stopwatch stopwatch&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8152470182944970248-4692102527884517946?l=blog.7oars.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.7oars.com/2008/08/announcing-stopwatch-030-and-7-oars.html</link><author>noreply@blogger.com (John)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8152470182944970248.post-8533530764900617402</guid><pubDate>Tue, 22 Jul 2008 02:37:00 +0000</pubDate><atom:updated>2008-07-21T21:38:50.834-05:00</atom:updated><title>jsonpickle 0.0.5 released</title><description>Thanks to Dean for pointing the incompatibility with CouchDB keys.  This release breaks backwards compatibility by removing the two leading underscores from the special "class*__" keys.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Install / Upgrade:&lt;/span&gt;&lt;br /&gt;The easiest path is with PyPi:&lt;br /&gt;easy_install -U jsonpickle&lt;br /&gt;&lt;br /&gt;Other installation candidates are on &lt;a href="http://code.google.com/p/jsonpickle/downloads/list"&gt;Google&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This release also marks a switch to Google Code's Subversion repository:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;svn checkout http://jsonpickle.googlecode.com/svn/trunk/ jsonpickle&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Feel free to help out or find bugs!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8152470182944970248-8533530764900617402?l=blog.7oars.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.7oars.com/2008/07/jsonpickle-005-released.html</link><author>noreply@blogger.com (John)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8152470182944970248.post-1728289562724282731</guid><pubDate>Thu, 12 Jun 2008 05:22:00 +0000</pubDate><atom:updated>2008-06-12T01:23:10.624-05:00</atom:updated><title>jsonpickle 0.0.4 released</title><description>The 0.0.4 release of &lt;a href="http://code.google.com/p/jsonpickle/"&gt;jsonpickle&lt;/a&gt; is a bugfix release.  One user, Ian Kallen, noted an issue using Paver, so we have switched back to regular setuptools.  Thanks Ian!  If you have 0.0.2 already installed, you do not have to upgrade.&lt;br /&gt;&lt;br /&gt;You can download the new release via&lt;br /&gt;&lt;pre&gt;easy_install -U jsonpickle&lt;/pre&gt;&lt;br /&gt;or from google:&lt;br /&gt;&lt;a href="http://code.google.com/p/jsonpickle/downloads/list"&gt;http://code.google.com/p/jsonpickle/downloads/list&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8152470182944970248-1728289562724282731?l=blog.7oars.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.7oars.com/2008/06/jsonpickle-004-released.html</link><author>noreply@blogger.com (John)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8152470182944970248.post-4203374314234519117</guid><pubDate>Sat, 07 Jun 2008 04:25:00 +0000</pubDate><atom:updated>2008-06-06T23:25:26.787-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">python</category><category domain="http://www.blogger.com/atom/ns#">json</category><category domain="http://www.blogger.com/atom/ns#">jsonpickle</category><title>Announcing jsonpickle 0.0.2</title><description>&lt;a href="http://code.google.com/p/jsonpickle/"&gt;jsonpickle&lt;/a&gt;, a python library for serializing Python objects to &lt;a href="http://json.org/"&gt;JSON&lt;/a&gt;, is now public.  The unique feature of jsonpickle is that it will work on almost any existing builtin or custom object without modification.  &lt;a href="http://www.undefined.org/python/"&gt;simplejson&lt;/a&gt; does include a mechanism for serializing objects by defining a '.default()' method, but this requires modification to the class.   Additionally, Christopher Lenz's &lt;a href="http://code.google.com/p/couchdb-python/"&gt;Python CouchDB wrapper&lt;/a&gt;, using the Schema class, allows a class to implement JSON safe fields.  While powerful, it still requires an upfront effort and is unable to handle existing code.&lt;br /&gt;&lt;br /&gt;Marc Stober &lt;a href="http://www.marcstober.com/blog/2007/07/07/serializing-arbitrary-python-objects-to-json-using-__dict__/"&gt;proposed&lt;/a&gt; using an object's __dict__ to serialize an object.  His approach forms the basic tenet of jsonpickle.  jsonpickle, though, takes this approach to the extreme, allowing for a much more robust solution, including allowing embedded objects to be serialized.&lt;br /&gt;&lt;br /&gt;jsonpickle is currently able to handle a wide-range of Python objects: new-style and old-style classes, dictionaries, lists, time_struct's, even Mark Pilgrim's &lt;a href="http://www.feedparser.org/"&gt;Universal Feed Parser&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;&gt;&gt; import jsonpickle&lt;br /&gt;&gt;&gt;&gt; from jsonpickle.tests.classes import Thing&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Create an object.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;&gt;&gt; obj = Thing('A String')&lt;br /&gt;&gt;&gt;&gt; print obj.name&lt;br /&gt;A String&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Use jsonpickle to transform the object into a JSON string&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;&gt;&gt; pickled = jsonpickle.dumps(obj)&lt;br /&gt;&gt;&gt;&gt; print pickled&lt;br /&gt;{"child": null, "__classname__": "Thing", "name": "A String", "__classmodule__": "jsonpickle.tests.classes"}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Use jsonpickle to recreate a Python object from a JSON string&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;&gt;&gt; unpickled = jsonpickle.loads(pickled)&lt;br /&gt;&gt;&gt;&gt; print unpickled.name&lt;br /&gt;A String&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The new object has the same type and data, but essentially is now a copy of the original.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;&gt;&gt; obj == unpickled&lt;br /&gt;False&lt;br /&gt;&gt;&gt;&gt; obj.name == unpickled.name&lt;br /&gt;True&lt;br /&gt;&gt;&gt;&gt; type(obj) == type(unpickled)&lt;br /&gt;True&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;If you will never need to load (regenerate the Python class from JSON), you can&lt;br /&gt;pass in the keyword unpicklable=False to prevent extra information from being&lt;br /&gt;added to JSON.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&gt;&gt;&gt; oneway = jsonpickle.dumps(obj, unpicklable=False)&lt;br /&gt;&gt;&gt;&gt; print oneway&lt;br /&gt;{"name": "A String", "child": null}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;jsonpickle currently extends the functionality of simplejson (future releases may use a different library, such as cjson).&lt;br /&gt;&lt;br /&gt;The package is available on PyPi (so you can get it via an 'easy_install jsonpickle').  Additionally, Google Code is hosting the &lt;a href="http://code.google.com/p/jsonpickle/downloads/list"&gt;binary distributions&lt;/a&gt; of the code (including a Windows installer).&lt;br /&gt;&lt;br /&gt;Feel free to help out!  We could use reports of what &lt;a href="http://code.google.com/p/jsonpickle/wiki/ThirdPartyModules"&gt;other modules&lt;/a&gt; work or do not work with jsonpickle.  Submit bug reports.  Hack the &lt;a href="http://code.7oars.com/hg/jsonpickle/"&gt;code&lt;/a&gt; (we are currently using Mercurial).  Join the &lt;a href="http://groups.google.com/group/jsonpickle"&gt;mailing list&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;One warning:  jsonpickle is still alpha level software.  The code is tested, but bugs may exist.  Additionally, we do not currently guarantee backwards-compatibility yet--so the json output may not be valid to jsonpickle in future releases.&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8152470182944970248-4203374314234519117?l=blog.7oars.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.7oars.com/2008/03/announcing-jsonpickle-002.html</link><author>noreply@blogger.com (John)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8152470182944970248.post-8756577349889608708</guid><pubDate>Fri, 25 Jan 2008 07:38:00 +0000</pubDate><atom:updated>2008-01-25T01:50:36.267-06:00</atom:updated><title>Ad Initium</title><description>"At the beginning."&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8152470182944970248-8756577349889608708?l=blog.7oars.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.7oars.com/2008/01/ad-initium.html</link><author>noreply@blogger.com (John)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>
