{"library":"miniwdl","title":"miniwdl","description":"miniwdl is a Python library and command-line tool for running and developing Workflow Description Language (WDL) workflows locally. It provides a WDL runtime, a parser, and utilities for WDL authors. The current version is 1.13.1, and it maintains an active release cadence, addressing bugs, updating dependencies, and enhancing WDL specification compliance.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install miniwdl"],"cli":{"name":"miniwdl","version":"miniwdl v1.14.2"}},"imports":["from miniwdl import runner","from miniwdl import main","from miniwdl import wdl"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import miniwdl.runner\nimport os\n\n# Create a simple WDL file for demonstration\nwdl_content = \"\"\"\nversion 1.0\nworkflow hello {\n  input { String name }\n  call hello_task { input: name = name }\n}\ntask hello_task {\n  input { String name }\n  command { echo \"Hello, ${name}!\" }\n  output { String message = read_string(stdout()) }\n}\n\"\"\"\nwith open(\"hello.wdl\", \"w\") as f:\n    f.write(wdl_content)\n\n# Define inputs as a dictionary\ninputs = {\"hello.name\": \"WDL User\"}\n\n# Run the WDL workflow\ntry:\n    run_result = miniwdl.runner.run(\n        wdl=\"hello.wdl\",\n        inputs=inputs,\n        dir=os.getcwd() # Specify directory where WDL is found\n    )\n    # Access outputs\n    print(f\"Workflow output: {run_result.outputs['hello.hello_task.message']}\")\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\nfinally:\n    # Clean up the dummy WDL file\n    if os.path.exists(\"hello.wdl\"):\n        os.remove(\"hello.wdl\")\n","lang":"python","description":"This quickstart demonstrates how to programmatically run a simple WDL workflow using `miniwdl.runner.run`. It creates a temporary WDL file, defines inputs, executes the workflow, and prints the output.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}