4
I Use This!
Moderate Activity

News

Analyzed 1 day ago. based on code collected 1 day ago.
Posted about 17 years ago by [email protected] (John)
jsonpickle 0.2.0 has been tagged and released.There are a huge number of changes improving jsonpickle's ability to work with other Python objects.David Aguilar also added a superb json backend loader that allows the user to specify which json module ... [More] to use (simplejson, demjson, cjson, json).Please check out the new documentationThanks so much everyone who submitted issues to the mailing list and contributed time and effort!John [Less]
Posted about 17 years ago by [email protected] (John)
jsonpickle 0.2.0 has been tagged and released.There are a huge number of changes improving jsonpickle's ability to work with other Python objects.David Aguilar also added a superb json backend loader that allows the user to specify which json module ... [More] to use (simplejson, demjson, cjson, json).Please check out the new documentationThanks so much everyone who submitted issues to the mailing list and contributed time and effort!John [Less]
Posted about 17 years ago by [email protected] (John)
jsonpickle 0.2.0 has been tagged and released.There are a huge number of changes improving jsonpickle's ability to work with other Python objects.David Aguilar also added a superb json backend loader that allows the user to specify which json module ... [More] to use (simplejson, demjson, cjson, json).Please check out the new documentationThanks so much everyone who submitted issues to the mailing list and contributed time and effort!John [Less]
Posted about 17 years ago by [email protected] (John)
There is a new release of stopwatch, 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.>>> from stopwatch import clockit>>> ... [More] @clockit def multiply(a, b): return a * b>>> r = multiple(4, 5)multiple in 1.38282775879e-05 sec>>> print r20You can obtain the new release with easy_installeasy_install -U stopwatchor download the appropriate release. [Less]
Posted about 17 years ago by [email protected] (John)
There is a new release of stopwatch, 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.>>> from stopwatch import clockit>>> ... [More] @clockit def multiply(a, b): return a * b>>> r = multiple(4, 5)multiple in 1.38282775879e-05 sec>>> print r20You can obtain the new release with easy_installeasy_install -U stopwatchor download the appropriate release. [Less]
Posted about 17 years ago by [email protected] (John)
There is a new release of stopwatch, 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.>>> from stopwatch import clockit>>> ... [More] @clockit def multiply(a, b): return a * b>>> r = multiple(4, 5)multiple in 1.38282775879e-05 sec>>> print r20You can obtain the new release with easy_installeasy_install -U stopwatchor download the appropriate release. [Less]
Posted about 17 years ago by [email protected] (John)
python-hl7 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.HL7 is a communication protocol and message format for health care data. It is ... [More] 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).The current implementation of python-hl7 does not completely follow the HL7 specification, 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.As an example, let's create a HL7 message:>>> message = 'MSH|^~\&|GHH LAB|ELAB-3|GHH OE|BLDG4|200202150930||ORU^R01|CNTRL-3456|P|2.4\r'>>> 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'>>> 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'>>> message += 'OBX|1|SN|1554-5^GLUCOSE^POST 12H CFST:MCNC:PT:SER/PLAS:QN||^182|mg/dl|70_105|H|||F\r'We call the hl7.parse() command with string message:>>> import hl7>>> h = hl7.parse(message)We get a n-dimensional list back:>>> type(h)There were 4 segments (MSH, PID, OBR, OBX):>>> len(h)4We can extract individual elements of the message:>>> h[3][3][1]'GLUCOSE'>>> h[3][5][1]'182'We can look up segments by the segment identifer:>>> pid = hl7.segment('PID', h)>>> pid[3][0]'555-44-4444'Downloadpython-hl7 will work with Python 2.5, 2.6, and 3.0. It is under a BSD license.The easiest way to obtain the package is with easy_installeasy_install hl7An egg and tar.gz file can be downloaded from PyPiYou can always clone or fork the source:hg clone http://bitbucket.org/johnpaulett/python-hl7/ [Less]
Posted about 17 years ago by [email protected] (John)
python-hl7 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.HL7 is a communication protocol and message format for health care data. It is ... [More] 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).The current implementation of python-hl7 does not completely follow the HL7 specification, 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.As an example, let's create a HL7 message:>>> message = 'MSH|^~\&|GHH LAB|ELAB-3|GHH OE|BLDG4|200202150930||ORU^R01|CNTRL-3456|P|2.4\r'>>> 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'>>> 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'>>> message = 'OBX|1|SN|1554-5^GLUCOSE^POST 12H CFST:MCNC:PT:SER/PLAS:QN||^182|mg/dl|70_105|H|||F\r'We call the hl7.parse() command with string message:>>> import hl7>>> h = hl7.parse(message)We get a n-dimensional list back:>>> type(h)There were 4 segments (MSH, PID, OBR, OBX):>>> len(h)4We can extract individual elements of the message:>>> h[3][3][1]'GLUCOSE'>>> h[3][5][1]'182'We can look up segments by the segment identifer:>>> pid = hl7.segment('PID', h)>>> pid[3][0]'555-44-4444'Downloadpython-hl7 will work with Python 2.5, 2.6, and 3.0. It is under a BSD license.The easiest way to obtain the package is with easy_installeasy_install hl7An egg and tar.gz file can be downloaded from PyPiYou can always clone or fork the source:hg clone http://bitbucket.org/johnpaulett/python-hl7/ [Less]
Posted about 17 years ago by [email protected] (John)
python-hl7 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.HL7 is a communication protocol and message format for health care data. It is ... [More] 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).The current implementation of python-hl7 does not completely follow the HL7 specification, 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.As an example, let's create a HL7 message:>>> message = 'MSH|^~\&|GHH LAB|ELAB-3|GHH OE|BLDG4|200202150930||ORU^R01|CNTRL-3456|P|2.4\r'>>> 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'>>> 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'>>> message += 'OBX|1|SN|1554-5^GLUCOSE^POST 12H CFST:MCNC:PT:SER/PLAS:QN||^182|mg/dl|70_105|H|||F\r'We call the hl7.parse() command with string message:>>> import hl7>>> h = hl7.parse(message)We get a n-dimensional list back:>>> type(h)There were 4 segments (MSH, PID, OBR, OBX):>>> len(h)4We can extract individual elements of the message:>>> h[3][3][1]'GLUCOSE'>>> h[3][5][1]'182'We can look up segments by the segment identifer:>>> pid = hl7.segment('PID', h)>>> pid[3][0]'555-44-4444'Downloadpython-hl7 will work with Python 2.5, 2.6, and 3.0. It is under a BSD license.The easiest way to obtain the package is with easy_installeasy_install hl7An egg and tar.gz file can be downloaded from PyPiYou can always clone or fork the source:hg clone http://bitbucket.org/johnpaulett/python-hl7/ [Less]
Posted over 17 years ago by [email protected] (John)
Thanks to Adam for finding the bug that missed longs as a primitive type.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. ... [More] 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 benchmarks), but simplejson is still useful on Google's App Engine.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.The update example:>>> import jsonpickle>>> from jsonpickle.tests.classes import ThingCreate an object.>>> obj = Thing('A String')>>> print obj.nameA StringUse jsonpickle to transform the object into a JSON string.>>> pickled = jsonpickle.encode(obj)>>> print pickled{"classname__": "Thing", "child": null, "name": "A String", "classmodule__": "jsonpickle.tests.classes"}Use jsonpickle to recreate a Python object from a JSON string>>> unpickled = jsonpickle.decode(pickled)>>> print unpickled.nameA StringGrab the new version.Thanks also go out to the Joose developers for integrating jsonpickle into their product! [Less]