Y YediPy
X12 / 270 / Python object model

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.

INPUTlossless X12
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 original payload is retained byte-for-byte after lexing.
OUTPUTtyped Python
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"
A supported 270 becomes an immutable Pydantic object hierarchy.

Why it matters

Useful structure without losing the evidence.

01

Lossless first

The raw interchange is still there when a downstream decision needs provenance.

02

Typed where known

Supported 270 hierarchy becomes named Python fields instead of positional strings.

03

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.