skillfed

cwl-utils

cwl-utils v0.43 230.2K downloads/30d#9,116 on PyPI43
Permissive license Apache 2.0 Active released

What it is and what it does

cwl-utils is a Python library and CLI toolkit for working with Common Workflow Language documents. It provides autogenerated typed Python classes for loading and parsing CWL v1.0, v1.1, and v1.2 files, plus a suite of command-line tools for common workflow manipulation tasks: extracting container images for pre-pulling, listing software requirements, refactoring inline expressions into separate steps, splitting packed CWL documents, packing workflows into single files, normalizing documents to a canonical form, and generating JSON schemas for workflow inputs.

The library depends on schema-salad for schema handling, ruamel-yaml for YAML parsing, rdflib for RDF support, and several other utilities. It is actively maintained, supports modern Python versions, and carries no known security vulnerabilities. The package is well-suited for developers building CWL workflow management tools, CI/CD integrations, or automation that needs to inspect or transform workflow definitions programmatically.

Use it for:

  • Pre-pull or cache all Docker/Singularity container images referenced in a CWL workflow before execution.
  • Extract and list all software packages and versions declared in a workflow for dependency tracking or citation.
  • Refactor CWL documents that use inline JavaScript expressions into separate ExpressionTools for engines that don't support inline evaluation.
  • Split a packed (single-file) CWL document into separate files for version control or modular editing.
  • Normalize heterogeneous CWL documents to a canonical JSON format with all dependencies bundled and versions upgraded to v1.2.
  • Generate JSON Schema definitions for workflow input parameters to validate or document workflow interfaces.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Loads, parses, and manipulates Common Workflow Language (CWL) documents across versions 1.0, 1.1, and 1.2, providing autogenerated typed classes and CLI utilities for workflow introspection and transformation.

Yes. The package is actively maintained, has low install friction, no security vulnerabilities, and a permissive license. It fills a clear need for developers working with CWL workflows at scale. Install if you need to parse, validate, transform, or introspect CWL documents programmatically or via CLI.

Install

cwl-utils on PyPI

pip

pip install cwl-utils

uv

uv add cwl-utils

poetry

poetry add cwl-utils

Installing cwl-utils

Before you install

Low install friction with a pure Python wheel distribution. Active maintenance as of 2026-08-14 with recent release. Supports current Python versions (3.10–3.15) and has no known vulnerabilities.

License in practice

Apache 2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects that can include attribution.

Quickstart

pip install cwl-utils

from cwl_utils.parser import load_document_by_uri, save
from pathlib import Path

cwl_obj = load_document_by_uri(Path("workflow.cwl"))
saved_obj = save(cwl_obj)

Requires Python 3.10 or later (package specifies >=3.10,<3.16).

Verify before relying

  • Whether the package's typed classes provide IDE autocomplete and type-checking benefits for CWL document manipulation.
  • Performance characteristics when parsing or transforming large or deeply nested CWL workflows.
  • Compatibility guarantees or migration path if CWL versions beyond 1.2 are released.

Package facts

License Apache 2.0 (permissive)
Python support supports the current Python release (<3.16,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 7 — cwl-upgrader, packaging, rdflib, requests, ruamel-yaml, schema-salad, typing-extensions
Maintenance actively maintained — 0 days since the last release
Last repo commit
First released
Downloads 230,155/month — #9,116 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cwl_utils-0.43-py3-none-any.whl

Keywords: common-workflow-language, commonwl, cwl, sciworkflows

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Topic :: File FormatsTopic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Information AnalysisTopic :: Software Development :: LibrariesTopic :: System :: Distributed ComputingTyping :: Typed

Tags

cwl document parsingcommon workflow language utilitiescwl workflow manipulationcwl version conversionworkflow container extractioncwl expression refactoringpacked cwl splitting
workflow-automationcwlbioinformatics

More Libraries packages