Metadata-Version: 2.4
Name: idfpy
Version: 25.2.0
Summary: Type-safe Pydantic models for all EnergyPlus IDF objects
Project-URL: Repository, https://github.com/ITOTI-Y/idfpy
Project-URL: Issues, https://github.com/ITOTI-Y/idfpy/issues
Author: ITOTI-Y
License-Expression: MIT
License-File: LICENSE
Keywords: building-simulation,energyplus,idf,pydantic
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: jinja2>=3.1.6
Requires-Dist: loguru>=0.7.3
Requires-Dist: pydantic>=2.0
Requires-Dist: typer>=0.21.1
Description-Content-Type: text/markdown

# idfpy

Type-safe [Pydantic](https://docs.pydantic.dev/) models for **all** [EnergyPlus](https://energyplus.net/) IDF object types, plus IDF file read/write and simulation execution.

Auto-generated from `Energy+.schema.epJSON` version **25.2.0**.

## Features

- **858 object types** as Pydantic v2 models with full validation
- **275 reference types** with cross-object validation
- **Case-insensitive** Literal field matching (EnergyPlus IDF is case-insensitive)
- **Extensible field** support (vertices, schedule data, etc.)
- **IDF read/write** with positional field ordering
- **EnergyPlus simulation** execution with ExpandObjects support
- Accepts both `snake_case` and original EnergyPlus schema key names

## Installation

```bash
pip install idfpy
```

## Quick Start

```python
from pathlib import Path
from idfpy import IDF
from idfpy.models.simulation import Version, Building
from idfpy.models.thermal_zones import Zone

# Create an IDF
idf = IDF()
idf.add(Version())
idf.add(Building(name='MyBuilding', north_axis=0.0))
idf.add(Zone(name='Zone1'))

# Save
idf.save(Path('output.idf'))

# Load existing IDF
idf = IDF.load(Path('existing.idf'))
print(f'{len(idf)} objects loaded')

# Run simulation
idf.run(
    idf_path=Path('model.idf'),
    weather_path=Path('weather.epw'),
    output_dir=Path('results/'),
)
```

## License

MIT
