pip install edifabric-x12
bd96a836feca45cb91c86ee65d281f52. Download the libraryCompiled to native code with zero-copy UTF-8 buffers and streaming split/merge for high-throughput EDI processing.
A single self-contained shared library per platform. Copy that one file to the target machine and call it.
Translate between EDI data and structured JSON: a whole X12 interchange to JSON in one call with parse, and back again with build.
Process one transaction set or segment at a time with flat, low memory use - ideal for very large interchange files.
Validate transaction sets with configurable SNIP levels, regex, date/time formats, and error limits, for a detailed report.
Automatically generate 999, 997, and TA1 acknowledgments from validated interchanges in a single operation mode.
import json import edifabric_x12 as ef serial = "YOUR_SERIAL_KEY" ef.load_library() ef.ensure_token(serial, 3600) ef.set_map(json.dumps({"default": serial, "maps": {}})) edi = open("837P_Claim.txt", "rb").read() output, offset = ef.parse(edi, ef.ParseMode.JSON_VALIDATE) transactions = output[:offset] report = json.loads(output[offset:]) print(report["errors_count"])
using EdiFabric.Native.X12; const string serial = "YOUR_SERIAL_KEY"; EdiFabricX12.Load(); EdiFabricX12.EnsureToken(serial, seconds: 3600); EdiFabricX12.SetMap($$"""{"default": "{{serial}}", "maps": {}}"""); var edi = File.ReadAllBytes("837P_Claim.txt"); var result = EdiFabricX12.Parse(edi, ParseMode.JsonValidate); Console.WriteLine(result.Transactions); Console.WriteLine(result.Report);
import com.edifabric.nativex12.EdiFabricX12; import com.edifabric.nativex12.ParseMode; import com.edifabric.nativex12.ParseResult; String serial = "YOUR_SERIAL_KEY"; EdiFabricX12.loadLibrary(); EdiFabricX12.ensureToken(serial, 3600); EdiFabricX12.setMap("{\"default\":\"" + serial + "\",\"maps\":{}}"); String edi = Files.readString(Path.of("837P_Claim.txt")); ParseResult result = EdiFabricX12.parse(edi, ParseMode.JSON_VALIDATE); System.out.println(result.getTransactions()); System.out.println(result.getReport());
const fs = require("fs"); const ef = require("edifabric-x12"); const serial = "YOUR_SERIAL_KEY"; ef.loadLibrary(); ef.ensureToken(serial, 3600); ef.setMap(JSON.stringify({ default: serial, maps: {} })); const edi = fs.readFileSync("837P_Claim.txt"); const { output, offset } = ef.parse(edi, ef.ParseMode.JSON_VALIDATE); const transactions = output.slice(0, offset); const report = JSON.parse(output.slice(offset)); console.log(report.errors_count);
import ef "github.com/EdiFabric/edifabric-go-bindings" import _ "github.com/EdiFabric/edifabric-go-bindings/native" serial := "YOUR_SERIAL_KEY" ef.LoadLibrary("") ef.EnsureToken(serial, 3600) ef.SetMap([]byte(`{"default": "` + serial + `", "maps": {}}`)) edi, _ := os.ReadFile("837P_Claim.txt") output, offset, err := ef.Parse(edi, ef.ParseJSONValidate, nil) if err != nil { log.Fatal(err) } fmt.Println(string(output[:offset])) fmt.Println(string(output[offset:]))
use edifabric_x12 as ef; let serial = "YOUR_SERIAL_KEY"; ef::load_library(None)?; ef::ensure_token(serial, 3600)?; ef::set_map(&format!(r#"{{"default": "{serial}", "maps": {{}}}}"#))?; let edi = std::fs::read("837P_Claim.txt")?; let (output, offset) = ef::parse(&edi, ef::ParseMode::JsonValidate, None)?; let transactions = &output[..offset]; let report = &output[offset..]; println!("{transactions}"); println!("{report}");
#include "edifabric_x12.h" const char *serial = "YOUR_SERIAL_KEY"; ef_parse_result result; if (ef_load_library(NULL) != 0) return 1; ef_ensure_token(serial, 3600); ef_set_map("{\"default\":\"YOUR_SERIAL_KEY\",\"maps\":{}}"); char *edi = read_file("837P_Claim.txt", NULL); /* helper in example_all_functions.c */ if (ef_parse(edi, EF_PARSE_JSON_VALIDATE, NULL, &result) == 0) { /* transactions = output[0 .. offset), report = output[offset .. length) */ fwrite(result.output.data, 1, (size_t)result.output.length, stdout); ef_free(result.output.data); }
| Language | Install | Binding | Repository |
|---|---|---|---|
| Python | PyPI: pip install edifabric-x12 | ctypes, handles the grow-and-retry buffer | GitHub repository: edifabric-python-bindings |
| Node.js | npm: npm install edifabric-x12 | koffi, Node.js 18+, TypeScript types, CommonJS or ES modules | GitHub repository: edifabric-nodejs-bindings |
| Java | Maven Central: com.edifabric:edifabric-x12-native | JNA, plain Java methods | GitHub repository: edifabric-java-bindings |
| Go | Go modules: go get github.com/EdiFabric/edifabric-go-bindings | purego, no cgo or C compiler, iterators for split and merge | GitHub repository: edifabric-go-bindings |
| Rust | crates.io: cargo add edifabric-x12 | Safe crate over libloading, returns Result | GitHub repository: edifabric-rust-bindings |
| C# and .NET | NuGet: dotnet add package EdiFabric.Native.X12 | P/Invoke | GitHub repository: edifabric-csharp-bindings |
| C and C++ | Download the library and include edifabric_x12.h | The reference header and the ABI every binding wraps | GitHub repository: edifabric-c-bindings |
The packages bundle the library for Windows x64, Linux x64 and arm64, and macOS arm64, so one install command is all you need. Working in C++, PHP, Ruby, Swift, Kotlin or something else? Every binding calls the same handful of C entry points, so the C bindings document contains everything you need. Tell us which language you are on and we will help you wire it up.
validate_edi: validate X12 and HIPAA files up to SNIP level 4 and explain each errorparse_edi and build_edi: convert EDI to JSON and back, to read or change a fileacknowledge_edi: generate a 999 or 997, with a TA1 when the interchange asks for onesplit_edi: split a batch into one file per transactiondescribe_spec: show any transaction's loops, segments, elements and codes, or a JSON skeleton to fill inget_status: show the license, the models and the folders it may useIn Claude Code, run:
claude mcp add edifabric -- npx -y @edifabric/mcp
In Cursor, VS Code and other clients, add it to the MCP settings:
{
"mcpServers": {
"edifabric": {
"command": "npx",
"args": ["-y", "@edifabric/mcp"],
"env": { "EDIFABRIC_SERIAL": "YOUR_SERIAL" }
}
}
}
Needs Node.js 18 or later. Claude Desktop installs it from a one-click bundle without Node.js. Without a serial, it uses the demo serial.
Community costs nothing and never expires, giving you unlimited operations for the first 14 days, then 250 a day, and three leased seats for non-production work. Need more time? Ask support to extend the unlimited period. Developer and Enterprise lift the quota, Enterprise lifts the seat count, and all three include the same library.
Native is the newest of the three and covers X12 and HIPAA, with the remaining standards being released one at a time. If you need EDIFACT, HL7, NCPDP or flat files right now, use ediFabric .NET or ediFabric Cloud — your plan already includes them.
Every operation runs inside your own process, on your own hardware. EDI data and PHI stay on your systems, so Native sits entirely within the controls you already have in place for HIPAA or SOC 2.
bd96a836feca45cb91c86ee65d281f52.