Skip to main content

Lightweight Python wrapper for the Sympheny SaaS API to automate common workflows.

Project description

PyPI - Version PyPI - Python Version

Sympheny Toolbox

A lightweight Python wrapper for the Sympheny SaaS API to automate common workflows — create scenarios, run optimizations, manage variants, and more.

Install

pip install sympheny-toolbox

Requires Python 3.11+.

Authentication

Create a .properties file with your Sympheny credentials:

username=you@example.com
password=your-password

Then load and connect:

from sympheny_toolbox.sympheny import Sympheny
from sympheny_toolbox.utils import load_creds_basic

username, password = load_creds_basic("creds.properties")
s = Sympheny(username, password)

# Use is_dev=True for the dev environment

Tip: Don't commit credential files — use a secrets manager or .gitignore.

Usage

Find projects, analyses, and scenarios

project = s.find_project("My Project")
analysis = s.find_analysis("My Analysis", project["projectGuid"])
scenario = s.find_scenario("Base", analysis["analysisGuid"])

Create a scenario from Excel

scenario_guid = s.create_scenario_from_excel(
    excel_path="scenario.xlsx",
    scenario_name="demo",
    analysis_guid=analysis_guid,
)
print(s.scenario_url(scenario_guid))

Create scenario variants from Excel

variants = s.create_variants_from_excel(
    excel_path="variants.xlsx",
    master_scenario_id=scenario_guid,
)

Generate and read an input file

from sympheny_toolbox.utils import load_sheet_from_presigned_url

url = s.generate_input_file(scenario_guid)
rows = load_sheet_from_presigned_url(url, sheet="Conversion Techs")

Execute a scenario

s.execute_scenario(scenario_guid)

Create an EnyMap scenario

scenario_guid = s.create_scenario_enymap(
    scenario_name="enymap_demo",
    analysis_id=analysis_guid,
    techs=["PV", "HEAT_PUMP"],
    demands=["ELECTRICITY", "SPACE_HEATING"],
    imports=["ELECTRICITY"],
    exports=["HEAT_AMBIENT"],
    poly=[[lon, lat], ...],
)

Available EnyMap options are defined in sympheny_toolbox.enymap:

Parameter Options
techs PV, HEAT_PUMP, GAS_BOILER, CHILLER, BATTERY, HOT_WATER_STORAGE
demands HOT_WATER, SPACE_HEATING, ELECTRICITY, COOLING
imports ELECTRICITY
exports HEAT_AMBIENT, COOLING

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sympheny_toolbox-1.0.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sympheny_toolbox-1.0.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file sympheny_toolbox-1.0.0.tar.gz.

File metadata

  • Download URL: sympheny_toolbox-1.0.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sympheny_toolbox-1.0.0.tar.gz
Algorithm Hash digest
SHA256 aa3a19ff6fdae6837df01e9eadab284f3d887ff7a2d21049ef5d64860ca4dedf
MD5 b449b602458e900d515affff84e927ab
BLAKE2b-256 fc3e95989d09a1a714d06fdf4db76fe67be3f4c22b28cab85ab880b1a22f3151

See more details on using hashes here.

File details

Details for the file sympheny_toolbox-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sympheny_toolbox-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for sympheny_toolbox-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58efab1c294359f4e6e69c16abccf6e5c2e04d14092083f29df98639b0e16890
MD5 69c607e03a5ebcb20dfff2b1add9bfd5
BLAKE2b-256 e17c9594401b97c8c61559e7b0c23fe7f218dc0d178aa63af5bce3d61ad20583

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page