hl7lw: A Lightweight HL7 2.x Parsing Library
The hl7lw library aims to provide an extremely simple and lightweight API to read, modify, and write HL7 2.x messages. Minimal processing is done to the messages and most data access should feel very natural and pythonic.
The library also includes an MLLP implementation for both client and server.
All objects have docstrings.
import hl7lw
p = hl7lw.Hl7Parser()
m = p.parse_message(message_bytes)
if m["MSH-9.1"] == "ORU":
m["ORC-1"] = "RP"
message_bytes = p.format_message(m)
report = "\n".join([obx[5] for obx in m.get_segments('OBX') if obx[2] in ('TX', 'FT', 'ST')])
c = hl7lw.MllpClient()
c.connect(host="127.0.0.1", port="1234")
c.send(message_bytes)
ack_bytes = c.recv()
c.close()
ack_m = p.parse_message(ack_bytes)
assert ack_m["MSA-1.1"] == "AA"
assert m["MSH-10"] == ack_m["MSA-2"]
Metadata
Release files for hl7lw 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hl7lw-0.1.2.tar.gz | 22.3 kB | Without provenance | Details for hl7lw-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hl7lw-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for hl7lw-0.1.2-py3-none-any.whl |
Total release size: 42.5 kB
Release files / hl7lw-0.1.2.tar.gz
| Download URL | hl7lw-0.1.2.tar.gz |
|---|---|
| Size | 22.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62032f6e73c96e632a79f16373858e3e93800dfb879e96318b5dacd7499f89dd
|
|
BLAKE2b-256 checksum How to use checksums |
8040de1fc1ea27eadaef9e2bca77ef185888dfcb5f1429f42a851df5591b88b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Release files / hl7lw-0.1.2-py3-none-any.whl
| Download URL | hl7lw-0.1.2-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72ef355524aa0620a4b9f321157f44719441606da5453274fc6087f3870983ff
|
|
BLAKE2b-256 checksum How to use checksums |
3a3f869402769cf08556f7685219a15a5f1ac1bc3530bea09e98bebf12eb246e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.20
|
Security for hl7lw 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.