Python client for the SynergyPlus distributed EnergyPlus runner.
Project description
SynergyPlus Python SDK
synergyplus is the official Python client for the SynergyPlus
distributed EnergyPlus runner. It wraps the apiserver's HTTP API for submitting
simulations and parametric batches, polling their state, and fetching results.
Install
pip install synergyplus
# Optional: enable SynergyClient.upload_input() for pushing local model/weather
# files to S3-compatible storage (MinIO, AWS S3, ...).
pip install "synergyplus[s3]"
Requires Python 3.9+.
Quickstart
from synergyplus import SynergyClient, ArtifactRef
sp = SynergyClient("http://localhost:8090", token="synergy-dev-key")
sim = sp.submit_simulation(
engine_version="24.1.0",
model=ArtifactRef("s3://models/sample/baseline.idf"),
weather=ArtifactRef("s3://weather/sample/chicago.epw"),
)
sp.wait(sim["id"])
print(sp.get_results(sim["id"]))
API
SynergyClient(base_url, token=None, timeout=30.0)
| Method | Description |
|---|---|
healthz() |
GET /healthz — returns True if the apiserver is up. |
submit_simulation(*, engine_version, model, weather, priority=None, extraction_spec=None) |
POST /v1/simulations → {id, state}. |
get_simulation(sim_id) |
GET /v1/simulations/{id} → {id, state, verdict?, result?}. |
get_results(sim_id) |
GET /v1/results/{simId} → {verdict, metrics, artifactUri}. |
wait(sim_id, *, poll=2.0, deadline=None) |
Block until the simulation reaches a terminal state (succeeded/failed). |
submit_batch(*, engine_version, weather, variants, priority=None, max_parallelism=None, idempotency_key=None) |
POST /v1/batches → {batchId, state}. |
get_batch(batch_id) |
GET /v1/batches/{id} → {id, state, total, succeeded, failed}. |
list_batch_simulations(batch_id, *, limit=100, offset=0) |
GET /v1/batches/{id}/simulations → {items, total}. |
upload_input(local_path, ref, *, s3_endpoint=None, s3_region="us-east-1", s3_access_key=None, s3_secret_key=None) |
Upload a local file to an s3:// ref and return an ArtifactRef with its sha256. Requires the s3 extra. |
model/weather accept either an s3://... string or an ArtifactRef.
Batch example
from synergyplus import SynergyClient, ArtifactRef, Variant
sp = SynergyClient("http://localhost:8090", token="synergy-dev-key")
batch = sp.submit_batch(
engine_version="24.1.0",
weather=ArtifactRef("s3://weather/sample/chicago.epw"),
variants=[
Variant(model=ArtifactRef("s3://models/a.idf")),
Variant(model=ArtifactRef("s3://models/b.idf")),
],
max_parallelism=8,
)
print(batch["batchId"])
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synergyplus-0.2.0.tar.gz.
File metadata
- Download URL: synergyplus-0.2.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
641b4c7e47c2c273abd259adff11747c39bcc2def9f4bafa93699f1d8923f61b
|
|
| MD5 |
40584f6dc414bac63504c081e158ed8f
|
|
| BLAKE2b-256 |
f635a5e3f6f3eb1c3fc412f1cb4b8600b1d1723177957846f09d6ddee1b2e8aa
|
Provenance
The following attestation bundles were made for synergyplus-0.2.0.tar.gz:
Publisher:
release-pypi.yml on City-Syntax/SynergyPlus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synergyplus-0.2.0.tar.gz -
Subject digest:
641b4c7e47c2c273abd259adff11747c39bcc2def9f4bafa93699f1d8923f61b - Sigstore transparency entry: 1945481552
- Sigstore integration time:
-
Permalink:
City-Syntax/SynergyPlus@5dc341f5cd650cffd489bae1bf1f5b7ca68ae2ab -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/City-Syntax
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@5dc341f5cd650cffd489bae1bf1f5b7ca68ae2ab -
Trigger Event:
push
-
Statement type:
File details
Details for the file synergyplus-0.2.0-py3-none-any.whl.
File metadata
- Download URL: synergyplus-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76313c11ea6d2b3aafaffa64031750f76814e6bfc3e89fad611e213220081a87
|
|
| MD5 |
750c4392a12f131d83851727d9c1a338
|
|
| BLAKE2b-256 |
2a21f133c773c9ef46fc03d80137fbe4b1577979bd93dcb3ebe361fdd9c94c1f
|
Provenance
The following attestation bundles were made for synergyplus-0.2.0-py3-none-any.whl:
Publisher:
release-pypi.yml on City-Syntax/SynergyPlus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synergyplus-0.2.0-py3-none-any.whl -
Subject digest:
76313c11ea6d2b3aafaffa64031750f76814e6bfc3e89fad611e213220081a87 - Sigstore transparency entry: 1945481584
- Sigstore integration time:
-
Permalink:
City-Syntax/SynergyPlus@5dc341f5cd650cffd489bae1bf1f5b7ca68ae2ab -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/City-Syntax
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@5dc341f5cd650cffd489bae1bf1f5b7ca68ae2ab -
Trigger Event:
push
-
Statement type: