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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sympheny_toolbox-1.1.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.1.1.tar.gz
Algorithm Hash digest
SHA256 854f5e772960689e30ecc6c16910be295a8598df99582976c268d0ef274d288a
MD5 ff7228c072950e5cc613852eba732564
BLAKE2b-256 2a5815834600e4557de0ad6d6538d0407ef9b39fca07a2a4e69dbd702bcb4ce2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sympheny_toolbox-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 72f2c14463527a86b139dbf2e2462ed52c5349ac4313311bd3438960c678bb20
MD5 fb1eb31177caf0502f9f7e110eda6b58
BLAKE2b-256 6ea98f1cbe7b8d1c494d68dbf24aec02a4aa2bb51ac09b74e597d54f564e39e3

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