Skip to main content

epmodel

epmodel is a pydantic (V2) data model for EnergyPlus modeling. The data model code itself is automatically generated from the EnergyPlus JSON schema using the datamodel-code-generator package.

Usage

Due to the size of the official EnergyPlus JSON schema, we reduce the data model scope down the a few commonly used ones. The name of these data models are list in the keys.txt file, which is also used to generate the data model code.

Expanding the scope of data model

We can add object to the data model by adding names directly to the keys.txt file.

Generate the source code

To generate the source code, run the following command inside the codegen directory:

python codegen.py

As a result, a src/epmodel/model.py file will be a generated with the data model code.

Using the data model

Using the data model object is as simple as:

import json
from epmodel import EnergyPlusModel

with open("model.epJSON", "r") as f:
    data = json.load(f)
model = EnergyPlusModel.model_validate(data)

The code above loads in the EnergyPlus epJSON model and validate it against the data model. If the mode is valid, a EnergyPlusModel object will be returned, otherwise, an ValidationError will be raised.

One of the benefits of having such data model, beyond data validation, is that we can use autocomplete in IDE to help use write the code.

Dependencies

Dependency for code generation

Metadata

Release files for epmodel 0.10.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 epmodel 0.10.0
File Size Uploaded Provenance Actions
epmodel-0.10.0.tar.gz 62.7 kB Without provenance Details for epmodel-0.10.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for epmodel 0.10.0
File Interpreter ABI Platform Actions
epmodel-0.10.0-py3-none-any.whl Python 3 none any Details for epmodel-0.10.0-py3-none-any.whl

Total release size: 124.5 kB

Release files / epmodel-0.10.0.tar.gz

Download URL epmodel-0.10.0.tar.gz
Size 62.7 kB
Tags Source
SHA-256 checksum
How to use checksums
42fbbf228b6dd9d90c3451cef59fbe79391904edd0e48ebed160be4dd8d44142
BLAKE2b-256 checksum
How to use checksums
16ccc3966b576323d6b0bcc16561b21b2997f1b2e4651355d0c756ec6d1775e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / epmodel-0.10.0-py3-none-any.whl

Download URL epmodel-0.10.0-py3-none-any.whl
Size 61.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cde0a0f6ff33d64cdc9f31e42345dd5677ce9278e80730f65bba60242bd6d50b
BLAKE2b-256 checksum
How to use checksums
eab0245c3d371ad1fc4a0bc9d7b8cb32fe94b6c18974efb9bbecfd2515687958
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Security for epmodel 0.10.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.

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