Skip to main content

A Python library designed for developing and executing Sesam-enabled workflows on either local systems or OneCompute cloud platforms.

Project description

SesamCommands: Streamlining Sesam Workflows

For developers seeking to simplify the development and execution of Sesam workflows on both local and cloud platforms, the SesamCommands is an invaluable Python package. It empowers you to execute Sesam Core, Wasim, and Sestra applications within your workflows. The intricacies involved in the execution and management of workflows are taken care of by OneWorkflow and OneCompute Python packages. In summary, the SesamCommands Python library is optimal for developers aiming to enhance their Sesam workflow development process.

Usage and Examples

For a more comprehensive understanding and additional examples, please visit the Homepage link provided on this page.

"""Demonstration of executing a SesamCoreCommand using the OneWorkflow client asynchronously."""

# Import necessary modules and functions
import asyncio
from dnv.oneworkflow.utils import (
    CommandInfo,
    one_workflow_client,
    run_managed_commands_in_parallel_async,
)
from dnv.sesam.commands import SesamCoreCommand

# Instantiate the OneWorkflow client with workspace ID and path
client = one_workflow_client(
    workspace_id="TestWorkflow", workspace_path=r"C:\MyWorkspace", cloud_run=False
)

# Create an instance of the SesamCoreCommand class, specifying the command, input file name, and options
sesam_core_command = SesamCoreCommand(
    command="uls", input_file_name="input.json", options="-v"
)

# Create an instance of the CommandInfo class, specifying the commands and load case folder name
cmd_info = CommandInfo(
    commands=[sesam_core_command],
    load_case_foldername="LoadCase1",
)

# Run workflow/command asynchronously
asyncio.run(
    run_managed_commands_in_parallel_async(
        client=client,
        commands_info=[cmd_info],
    )
)

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

dnv_sesam_commands-5.18.0.0.tar.gz (11.9 kB view hashes)

Uploaded Source

Built Distribution

dnv_sesam_commands-5.18.0.0-py3-none-any.whl (15.6 kB view hashes)

Uploaded Python 3

Supported by

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