Example CWL FastAPI execution in Python

Hello everyone,

I am currently working on a little testing project of creating a smalled dockerized FastAPI service for executing CWL workflows via OGC API. I am storing CWL workflows in an sqlite db and would like to execute a given process with a POST request to an endpoint. Basically, selecting a CWL workflow and providing all of the inputs in the request and then execute.

However, I am having a tough time with wrapping my head around the python API reference. Particularly getting all of the necessary components/concepts together to successfully execute (all the context, runtimecontext, factory etc.).

I was wondering if someone has a similar example to what I am trying to do or can provide some explanation on the key components and steps/flow that needs to defined. Thank you very much, have a nice day!

Hi, you may be interested in the GA4GH’s WES API standard. This is for workflow execution service, so-called workflow-as-a-service.
https://ga4gh.github.io/workflow-execution-service-schemas/docs/

Here’s our implementation of the WES as well, if you’re interested in…

Hi inutano,

Thank you very much for the links. Looks very similar to what I would like to achieve. I will look at it in more detail and see if it helps me understand it more!

Cheers!