The HL7 v2.x standards define one of the key communication interfaces in Medical IT. Therefore, a lot of software is available for parsing, interpreting and sending HL7 messages. Unfortunately most of the code available in public domain is written in Java and hideous.
There is one HL7 library which is written in Python, so we decided to make the one we wrote available for the public, too. It is still fresh from the press, and rough around the edges, but it has some niceties. Segments can be configured via configuration lists to allow data retrieval from hl7 via named attributes. It is tested with unit tests (not extensively, yet). Most of all, it is flexible, simple to use and easy to understand.
Feel free to fork or contribute your additions to the library.
You can find the code at github: https://github.com/mps-gmbh/hl7-parser.