seamm_dashboard_client package
Submodules
seamm_dashboard_client.dashboard module
A proxy for interacting with SEAMM Dashboards.
This package provides functions and classes for interacting with the REST api of SEAMM dashboards.
- class seamm_dashboard_client.dashboard.Dashboard(name, url, username=None, password=None, user_agent=None, timeout=60, verify=True)[source]
Bases:
object- add_project(project, description='')[source]
Add a project to the datastore for this dashboard.
- Parameters:
project (str) – The name of the new project.
description (str) – An optional description of the project.
- jobs(title=None, description=None, limit=None, sort_by='id', order='asc')[source]
Return a list of Job objects.
- list_projects()[source]
Get a list of the project names.
Uses
GET /api/projects(full project objects,namea required field on both backends – see the oldseamm_dashboard’sswagger.yml) and extracts just the names, rather than the old dashboard-onlyGET /api/projects/list(a list of bare name strings) this used to call:seamm_webuihas no such endpoint at all – hitting it there 422s (FastAPI trying to parse the literal path segment"list"as an/api/projects/{project_id}integer). This shape works identically against both, so no per-backend branching is needed.
- list_queues()[source]
Get the list of queues (cluster/section targets) this dashboard’s paired JobServer instance can route jobs to, with the per-field override limits a submission client should render as constrained inputs – see seamm_jobserver’s docs/developer_guide/campaigns/2026-08-10/ (multi-queue routing).
Empty if the dashboard doesn’t support this at all (only seamm_webui implements
GET /api/queues– an old seamm_dashboard 404s) or has no queues configured there – both treated as an ordinary case, not an error, since queue routing is an optional, additive feature a caller should just not offer a picker for rather than fail over.
- login()[source]
Log the session into the dashboard.
- Parameters:
dashboard (str) – The name of the dashboard.
- Returns:
session, and the CSRF token or None
- Return type:
requests.session, str
- property name
The name of the dashboard.
- project(project_id)[source]
Return a Project given the id.
- Parameters:
project_id (int) – The id of the project.
- Returns:
_Project() – A Project object.
.. note:: –
The Project data looks like this:
{ "description": "", "flowcharts": [], "group": "staff", "group_id": 2, "id": 3, "jobs": [], "name": "recipes", "owner": "psaxe", "owner_id": 2, "path": "/Users/psaxe/SEAMM_DEV/Jobs/projects/recipes", "special_groups": [], "special_users": [] }
- projects(name=None, description=None, limit=None)[source]
Return a list of Project objects.
- Parameters:
name (str) – If not None, select only projects whose name matches
description (str) – If not None, select only projects whose description matches
limit (int) – If not None, limit the number of projects to this value
- Returns:
[_Project] – A list of Project object.
.. note:: –
The Project data looks like this:
{ "description": "", "flowcharts": [], "group": "staff", "group_id": 2, "id": 3, "jobs": [], "name": "recipes", "owner": "psaxe", "owner_id": 2, "path": "/Users/psaxe/SEAMM_DEV/Jobs/projects/recipes", "special_groups": [], "special_users": [] }
- status()[source]
The status of the Dashboard
Contact the Dashboard, checking for errors, timeouts, etc. and report back the current status.
- Returns:
status – “running” “down” “error”
- Return type:
enum (a string…)
- submit(flowchart, values={}, project='default', title='', description='', queue=None, slurm_overrides=None)[source]
Submit the job to the dashboard.
- Parameters:
queue (str or None) – Which queue (cluster/section) the paired JobServer instance should route this job to – one of the names
list_queues()returns.None(default) lets the JobServer fall back to its own configured default queue, or run it locally if it has no queue config at all – see seamm_jobserver’s docs/developer_guide/campaigns/2026-08-10/.slurm_overrides (dict or None) – Per-directive SLURM overrides for this job, e.g.
{"ntasks": 4, "mem": "40G"}– must be authorized by the chosen queue’slimits(fromlist_queues()); the JobServer re-validates server-side regardless of what this sends.
- property url
The base url of the dashboard
- property verify
How to verify this dashboard’s TLS certificate – see __init__.
- exception seamm_dashboard_client.dashboard.DashboardConnectionError(dashboard, *args)[source]
Bases:
Exception
- exception seamm_dashboard_client.dashboard.DashboardLoginError(dashboard, *args)[source]
Bases:
Exception
- exception seamm_dashboard_client.dashboard.DashboardNotRunningError(dashboard, *args)[source]
Bases:
Exception
- exception seamm_dashboard_client.dashboard.DashboardSubmitError(dashboard, *args)[source]
Bases:
Exception
- exception seamm_dashboard_client.dashboard.DashboardTimeoutError(dashboard, *args)[source]
Bases:
Exception
Module contents
seamm_dashboard_client Plots for computational materials/molecular science