Skip to main content

ZEN-creator

Lightweight utilities for creating and managing ZEN energy-system models and associated datasets. Full developer and user documentation is available online.

Quick start

  • Create the conda environment included with the repository:
conda env create -f zen_creator_env.yml
conda activate zen-creator-env
  • Or install in editable mode with pip:
python -m pip install -e .

Basic usage

Programmatic usage is the recommended way to build and manipulate ZEN models. The central entry point is the Model class which can be constructed in several ways: directly, from a configuration file, or by loading an existing ZEN-garden input folder.

from pathlib import Path
from zen_creator.model import Model

# 1) Create a model from a configuration file
model = Model.from_config(Path("config.yaml"))
model.build()
model.validate()
model.write()

# 2) Load an existing ZEN-garden input folder and update
existing = Path("existing_model")
model2 = Model.from_existing(existing)
model2.name = "updated_model"
model2.build()
model2.write()

# 3) Create an empty model and add sectors/elements programmatically
m = Model()
m.add_sector_by_name("electricity")
m.add_element_by_name("electricity", generic="carrier")
m.build()

Settings, variants and scenarios

  • Projects define typed settings as SettingsCategory subclasses, set in the settings: block of the configuration file and available as model.settings.<category>.<field>.
  • A models file declares named variants of a dataset as sparse patches of the settings, read with ModelSet.
  • Scenarios for ZEN-garden's scenario analysis are attached to attributes via Attribute.set_data(scenarios=...) or added with model.scenarios.add() and model.scenarios.add_set(), and written to scenarios.yaml.

Useful properties

  • model.carriers, model.technologies: dictionaries of elements
  • model.output_path: path where the model will be written

Documentation

The full documentation (API reference, developer guide and examples) is hosted online: ZEN-creator documentation

Contributing

project Contribution Guide.

Metadata

Release files for zen-creator 2.1.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 zen-creator 2.1.0
File Size Uploaded
zen_creator-2.1.0.tar.gz 62.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zen-creator 2.1.0
File Interpreter ABI Platform
zen_creator-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 150.3 kB

Release files / zen_creator-2.1.0.tar.gz

Download URL zen_creator-2.1.0.tar.gz
Size 62.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e7ac93bd9a86a1702c2bc919b6125ee988c225ff6b2e33fec541e64cb8ce8f5c
BLAKE2b-256 checksum
How to use checksums
3d6ce1566bc7df924bbbee48956e1bd9a9765237bc9bd4cbb9ed98ee8d19a0df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / zen_creator-2.1.0-py3-none-any.whl

Download URL zen_creator-2.1.0-py3-none-any.whl
Size 88.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95721632af3999bb012074777f19d16331d55bf07824867c6188fc66ee4e087d
BLAKE2b-256 checksum
How to use checksums
d85da93714356898ed21cfecbf3a164786a2ce40f968d4d404d33fabc7ab1971
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

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