Downloads

Libraries & tools

Official, zero-dependency reference implementations of ICF. Both parse, validate, build in memory, write, and generate the companion ICX index. Source on GitHub.

icfj

org.icformat:icfj
Java 11+ Deps none License CC BY 4.0 Size ~72 KB
pom.xml
<dependency>
  <groupId>org.icformat</groupId>
  <artifactId>icfj</artifactId>
  <version>1.0.0</version>
</dependency>
build.gradle
implementation 'org.icformat:icfj:1.0.0'

Direct download of the compiled library (Java 11 bytecode).

icfj-1.0.0.jar
Source & releases →

icfpy

icfpy
Python 3.9+ Deps none License CC BY 4.0 Build hatchling
shell
pip install icfpy
shell
git clone https://github.com/icformat/icfpy
cd icfpy
pip install -e .
example.py
import icfpy

doc = icfpy.parse(open("invoice.icf", encoding="utf-8").read())
print(doc.to_pretty_string())
Source & releases →
60-second start

Parse, navigate, build, write

The same lifecycle in both libraries: read a document, walk the data tree, build a node from scratch, and write it back.

Java — icfj
IcfDocument doc = Icf.parse(Paths.get("invoice.icf"));
IcfNode data = doc.toIcfNode();
String city = data.path("Project").path("Location").asText();

// validate
ValidationResult r = Icf.validate(icfText);
if (!r.isValid()) r.getErrors().forEach(System.out::println);

// build & write
IcfObject root = IcfNode.object();
root.putObject("vendor").put("id", "V001");
String icf = Icf.write(root);

// companion index
IcfDocument icx = Icf.generateIcx(doc, "invoice.icf", icfText);
Python — icfpy
import icfpy

doc = icfpy.parse(open("invoice.icf", encoding="utf-8").read())
data = doc.to_icf_node()
city = data.path("Project").path("Location").as_text()

# validate
r = icfpy.validate(icf_text)
if not r.is_valid:
    for e in r.errors: print(e)

# build & write
root = icfpy.IcfNode.object()
root.put_object("vendor").put("id", "V001")
icf = icfpy.write(root)

# companion index
icx = icfpy.generate_icx(doc, "invoice.icf", icf_text)
Full API reference ships with each library as DOCUMENTATION.md — the canonical, hand-maintained record of every public type and method.