ISA*00* *00* *ZZ*SENDER *ZZ*RECEIVER *... GS*HS*SENDER*RECEIVER*20240101*1200*1*X*005010X279A1~ ST*270*0001*005010X279A1~ BHT*0022*13*TRACE001*20240101*1200~ HL*1**20*1~ NM1*PR*2*PAYER*****PI*12345~ HL*2*1*21*1~ HL*3*2*22*0~ NM1*IL*1*DOE*JANE****MI*MEMBER01~ EQ*30~
The translation is not a black box
EDI becomes a Python object.
YediPy keeps the original X12 intact, then gives Python a structured, typed view of the transaction. The interchange remains traceable all the way through.
parsed = parse_x12(edi_bytes)
interchange = parsed.interchange
typed = parse_270(
interchange.transactions[0],
interchange.delimiters,
)
subscriber = (
typed.transaction
.information_sources[0]
.receivers[0]
.subscribers[0]
)
subscriber.name.name # "DOE"
Why it matters
Useful structure without losing the evidence.
Lossless first
The raw interchange is still there when a downstream decision needs provenance.
Typed where known
Supported 270 hierarchy becomes named Python fields instead of positional strings.
Safe when broken
Diagnostics expose structural locations, not member data or raw field values.
The objects you receive
From transport syntax to a navigable model.
Start with a generic interchange, narrow to an ST/SE transaction, and then ask for a typed implementation-specific model.
X12Interchange
Source bytes, delimiters, ordered segments, and transactions.
RawTransaction
One lossless ST/SE slice with its control information.
Transaction270
A typed eligibility inquiry rooted in its original transaction.
SubscriberLevel
Subscriber identity, inquiries, dependents, and raw segment references.
YediPy does not pretend EDI is easy. It makes it inspectable, testable, and usable in Python without severing the connection to the original transaction.