finds.dev← search

// the find

crs4/hl7apy

★ 281 · Python · MIT · updated Feb 2025

Python library to parse, create and handle HL7 v2 messages.

HL7apy is a Python library for parsing, building, validating and serialising HL7 v2 messages in ER7 form. It is for integration developers who receive or send HL7 feeds from hospital and lab systems and would rather not hand-roll the pipe-and-caret parsing.

- One package covers every HL7 v2 release from 2.1 through 2.8.2, with a single API across versions, so a legacy feed and a modern one can be handled the same way.

- Elements can be reached by segment name, long name or position, which makes message code easier to read than index arithmetic. Z-segments, custom encoding characters and message profiles are also supported.

- The tests ship sample profiles (ITI-21 and old pharm H4), so the profile handling has real inputs to run against rather than only synthetic fixtures.

- examples/iti_21 has a client and server pair that exchange PDQ query and response messages, which is a runnable reference for the MLLP transport side.

- Each version directory has its own copies of the fields, groups, segments, messages and datatypes modules. A bug in shared logic may need fixing in several places, so check that your version's code actually inherits the fix before you trust a patch.

- The last push was February 2025, about 19 months ago. The README still advertises Python 2.7 and 3.4 and tells people to run setup.py, and the Travis badge points at a CI service that no longer runs. Test it on your interpreter before depending on it, and expect to fork if you hit a bug.

- The README calls the MLLP server a simple implementation. Treat it as a reference, not a production transport, and check its connection handling yourself before exposing it to a network.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →