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.2.0.tar.gz (8.1 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.2.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sympheny_toolbox-1.2.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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.2.0.tar.gz
Algorithm Hash digest
SHA256 a4139cc146818ab62cc9b5ef1cde5c1de4ec8342ee41d494e030824339bef761
MD5 81ebdd31e68d359a3460cb008dbcbea8
BLAKE2b-256 1cf5c3478b5ca05c6e145bafc8c508e57e3586c223f104f14bca10c3ca683e38

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sympheny_toolbox-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d99cd150d948ef8d3c36703ddb6475c8f47e8c8c11dfc55c6c158097704c6e6a
MD5 99bc00c32774ff71d400f4283d1a6915
BLAKE2b-256 f6da796b1e9f73b96052192a7d9fcc33071b568f7286f7eb3889b8540b4ab057

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