Skip to main content

parseidf.py

Parses an IDF file (as used by EnergyPlus) into a dictionary of lists in the following manner:

  • each IDF object is represented by a list of its fields, with the first field being the object type.

  • each such list is appended to a list of objects with the same type in the dictionary, indexed by type:

{ A => [[A, x, y, z], [A, a, b, c]], B => [[B, 1, 2], [B, 1, 2, 3]] }

  • the index keys are all capitalized.

  • also, all field values are strings, i.e. no interpretation of the values is made.

Example

import parseidf

with open(r'in.idf', 'r') as f:
    idf = parseidf.parse(f.read())
print idf.keys()  # lists the object types in the idf file
print idf['OUTPUT:VARIABLE']  # lists all the Output:Variable objects in the idf file

Dependencies

parseidf depends on PLY (Python Lex & Yacc): https://pypi.python.org/pypi/ply/3.4

License & Credit

This project is licensed under the terms of the MIT license. See the file “LICENSE” in the project root for more information.

This module was developed by Daren Thomas at the assistant chair for Sustainable Architecture and Building Technologies (SuAT) at the Institute of Technology in Architecture, ETH Zürich.

Metadata

Release files for parseidf 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parseidf 1.0.0
File Size Uploaded Provenance Actions
parseidf-1.0.0.tar.gz 3.2 kB Without provenance Details for parseidf-1.0.0.tar.gz

Release files / parseidf-1.0.0.tar.gz

Download URL parseidf-1.0.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
41cb51b4d6bd0d66ae147615969ac9467a93e68fb5fd389f3d06a311c9a6f3da
BLAKE2b-256 checksum
How to use checksums
6fae50f384e950ee08eff238e5c6d4a324d02b0d90ea8a92149080a1891815f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for parseidf 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page