Skip to content

Download the results

Fetch the result file of a finished solver job, or link straight to its results dashboard in the web application.

Prerequisites

Get the result file URL

A finished job carries an output_file — a presigned URL to a zip of result workbooks, one Excel file per Pareto solution. It is only populated once the job's status is DONE.

import asyncio

from sympheny_toolbox import AsyncSympheny
from sympheny_toolbox.models import JobStatus


async def main() -> None:
    job_id = "your-job-id"
    async with AsyncSympheny("you@example.com", "password") as client:
        job = await client.solver_jobs.get(job_id)
        if job.status is not JobStatus.done or job.output_file is None:
            raise RuntimeError(f"No results available (status {job.status})")
        print(str(job.output_file.root))  # presigned URL to the results zip


asyncio.run(main())
from sympheny_toolbox import Sympheny
from sympheny_toolbox.models import JobStatus

job_id = "your-job-id"
with Sympheny("you@example.com", "password") as client:
    job = client.solver_jobs.get(job_id)
    if job.status is not JobStatus.done or job.output_file is None:
        raise RuntimeError(f"No results available (status {job.status})")
    print(str(job.output_file.root))  # presigned URL to the results zip

With the URL in hand you can download the zip with any HTTP client and open the workbooks yourself, or use the helper below to parse them for you.

Read a solution (sync client only)

workflows.get_output_file_dict downloads the zip, opens one solution's workbook, and returns its Cost & CO2 summary plus every Mode * profile sheet as plain Python data:

from sympheny_toolbox import Sympheny, workflows

with Sympheny("you@example.com", "password") as client:
    result = workflows.get_output_file_dict(client, "your-job-id", solution_num=1)
    print(result["Cost & CO2"])

To send someone to the interactive results dashboard rather than the raw file, workflows.dashboard_url returns the web-app URL of a scenario's first finished job:

from sympheny_toolbox import Sympheny, workflows

with Sympheny("you@example.com", "password") as client:
    print(workflows.dashboard_url(client, "your-scenario-guid"))

Both helpers are built on the synchronous client and have no async twin.