$npx skillfedfor your agent

pyx12

HIPAA X12 validator, parser and converter

Worth itPyPI Python ModulesReleased May 2026260.4K downloads / moBSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pyx12-4.0.0-py3-none-any.whl
v4.0.0 · released 2026-05-05 · Python >=3.11 · 1 runtime deps: defusedxml

Yes. Pyx12 is a stable, actively maintained library with low install friction, no security vulnerabilities, and a permissive license. It is the standard choice for X12 EDI parsing and validation in Python, especially for healthcare workflows. Install it if you need to work with ANSI X12 documents or HIPAA EDI compliance.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.11 or later.
  • X12 Implementation Guide maps must be present in pyx12/map/ for the transaction type and version being parsed.
  • Low friction: pure Python wheel with a single runtime dependency (defusedxml).

License · maintenance · safety

BSD (permissive) — BSD permissive license allows commercial and private use with minimal restrictions, making it suitable for proprietary healthcare applications.

last release 2026-05-05 (101 days) · last repo commit 2026-05-06 · 188 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 260,401 downloads/mo, #8,397 on PyPI

Verify before relying

import pyx12.x12context

src = pyx12.x12context.X12ContextReader(param, errh, fd_in)
for datatree in src.iter_segments('2300'):
    for loop2400 in datatree.select('2400'):
        value = loop2400.get_value('SV101')
        loop2400.set_value('SV102', 'xx')
  • Whether the package handles all common X12 transaction types (270, 271, 276, 277, 278, 834, 837, 841) or only a subset
  • Performance characteristics when processing large EDI files or high-volume streams
  • Whether custom validation rules or code lists can be extended beyond the bundled maps
Same gist for agents: .md · .json

What it is and what it does

Pyx12 is a HIPAA-focused X12 EDI parser and validator that reads ANSI X12 data files and validates them against X12 Implementation Guidelines. It generates standard 997 (for 4010) and 999 (for 5010) functional acknowledgments, detects and can fix common structural errors (loop/segment counting, line breaks), and converts between X12 and XML representations. The package ships with implementation-guide maps for multiple transaction types and versions; its design is transaction-agnostic, so new X12 transaction types can be added by registering new XML maps.

The library exposes a Python API for iterating over X12 loops and segments, reading and modifying values, and checking segment existence. It also provides command-line tools (x12valid, x12norm) for validation and normalization workflows. The single runtime dependency is defusedxml, used for safe XML parsing. Maintenance is active, with support for modern Python versions (3.11–3.14) and no known vulnerabilities.

Use it for

  • Validate incoming healthcare EDI claims (837) or eligibility requests (270) against HIPAA X12 standards before processing
  • Convert X12 EDI files to XML for integration with systems that consume structured XML data
  • Generate 997/999 functional acknowledgments to confirm receipt and validation status of X12 documents
  • Normalize malformed X12 files by fixing segment/loop counts and line-break issues before downstream processing
  • Build healthcare data pipelines that parse and extract specific claim or eligibility data from X12 loops and segments

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Pyx12 is a stable, actively maintained library with low install friction, no security vulnerabilities, and a permissive license. It is the standard choice for X12 EDI parsing and validation in Python, especially for healthcare workflows. Install it if you need to work with ANSI X12 documents or HIPAA EDI compliance.

Install

pyx12 on PyPI

Before you install

Low friction: pure Python wheel with a single runtime dependency (defusedxml). Active maintenance with a recent release (101 days ago) and steady repository activity. Supports current Python versions (3.11–3.14).

Requires Python 3.11 or later. X12 Implementation Guide maps must be present in pyx12/map/ for the transaction type and version being parsed.

License in practice

BSD permissive license allows commercial and private use with minimal restrictions, making it suitable for proprietary healthcare applications.

Quickstart

import pyx12.x12context

src = pyx12.x12context.X12ContextReader(param, errh, fd_in)
for datatree in src.iter_segments('2300'):
    for loop2400 in datatree.select('2400'):
        value = loop2400.get_value('SV101')
        loop2400.set_value('SV102', 'xx')

Verify before relying

  • Whether the package handles all common X12 transaction types (270, 271, 276, 277, 278, 834, 837, 841) or only a subset
  • Performance characteristics when processing large EDI files or high-volume streams
  • Whether custom validation rules or code lists can be extended beyond the bundled maps

Package facts

LicenseBSD permissive
Python supportSupports the current Python release >=3.11
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
defusedxml
MaintenanceActively maintained 101 days since the last release
Last repo commit
First released
Downloads260,401 / month, #8,397 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Healthcare IndustryLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Office/BusinessTopic :: Software Development :: Libraries :: Python Modules

Evidence: pyx12-4.0.0-py3-none-any.whl

Tags

Capabilities
x12 edi parser validatorhipaa x12 document processingedi message validationx12 to xml converterhealthcare edi translatoransi x12 compliance checkeredi acknowledgment generator
Topics
edi-healthcarex12-hipaadata-validation
PyPI keywords
x12hipaahealthcareedi

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “x12 edi parser validator”

  • pyx12Pyx12 parses, validates, and converts ANSI X12 EDI documents against…
  • pydifactPydifact parses and serializes UN/EDIFACT interchange files, allowing…
  • pyas2libBuilds and parses AS2 protocol messages with compression, signing,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also pydifact · hl7 · swagger-spec-validator · hl7apy · bids-validator · word2number · roman-numerals · ofxtools · iregexp-check · rfc3986-validator