Skip to content

idfkit

EnergyPlus IDF and epJSON tooling for Python and TypeScript. One API surface, one vocabulary, one site.

Release Build status Commit activity License

Python TypeScript v8.9 to v26.1, 17 versions O(1) lookups Reference tracking IDF + epJSON Schema validation No third-party runtime dependencies

Status

The Python library is released on PyPI: pip install idfkit. The TypeScript library is not yet published under the shared idfkit install name and its API is not stable, so the names on these pages can still change under it. Follow the TypeScript tabs by all means; pin nothing to them yet.


Read a model, change it, write it back

from idfkit import load_idf, save_idf

# Load an existing IDF file
doc = load_idf("in.idf")

# Query objects with O(1) lookups
zone = doc["Zone"]["Office"]
print(zone.x_origin, zone.y_origin)

# Modify a field
zone.x_origin = 10.0

# See what references the zone
for obj in doc.get_referencing("Office"):
    print(obj.obj_type, obj.name)

# Write back to IDF (or epJSON)
save_idf(doc, "out.idf")
import { loadIdf, saveIdf } from '@idfkit/core/node';
import type { TypeMap } from '@idfkit/types-v26-1';

// Load an existing IDF file
const doc = await loadIdf<TypeMap>('in.idf');

// Query objects with O(1) lookups
const zone = doc.require('Zone', 'Office');
console.log(zone.x_origin, zone.y_origin);

// Modify a field
zone.x_origin = 10;

// See what references the zone
for (const obj of doc.references.referencingObjects('Office')) {
  console.log(obj.typeName, obj.name);
}

// Write back to IDF (or epJSON)
await saveIdf(doc, 'out.idf');

The two programs read as one lesson because they are. Names are decided once for both languages and diverge only where the languages force it: a subscript against a method, a synchronous call against an awaited one. The naming map records every pair and the reason for each difference, and What each language has records the capabilities one of them does not carry yet.


Explore the docs

  • Tutorials


    Learning-oriented lessons: build your first model from an empty document, step by step, in either language.

    Tutorials

  • How-to guides


    Goal-oriented recipes: run simulations, work with weather data, parse in the browser, scale out.

    How-to guides

  • Reference


    The complete API, CLI, and configuration, generated from the source.

    Reference

  • Explanation


    Understanding-oriented discussion: architecture, caching, and the design decisions behind both libraries.

    Explanation

More resources

Page Description
What each language has Capability by capability, what Python and TypeScript carry today
The naming map Every shared name, and why the two libraries spell a few of them differently
How conformance is established How both libraries are proved against the IDF files EnergyPlus ships
Core Tutorial Interactive Python notebook covering basic, advanced, and expert usage
How to migrate from eppy Side-by-side comparison of eppy and idfkit APIs
How to migrate models between EnergyPlus versions Forward-migrate IDF models across EnergyPlus releases
Benchmarks Performance comparison against eppy and other tools
Troubleshooting Common errors and solutions