cwl-utils
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-utilsuv
uv add cwl-utilspoetry
poetry add cwl-utilsInstalling 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
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
cwl-upgraderUpgrades Common Workflow Language documents…
permissive · top 15,000 on PyPI
cwltoolcwltool is the reference implementation of the…
permissive · top 15,000 on PyPI
cwltestcwltest validates the output of Common Workflow…
permissive · top 15,000 on PyPI
common-expression-languageEvaluates Google's Common Expression Language…
permissive · top 15,000 on PyPI
langchain-text-splittersSplits text documents into chunks using a…
permissive · top 1,000 on PyPI
cssselectcssselect parses CSS3 selectors and translates…
permissive · top 1,000 on PyPI
parselParsel extracts data from HTML, JSON, and XML…
permissive · top 5,000 on PyPI
license-expressionParses, validates, simplifies, and normalizes…
permissive · top 1,000 on PyPI
hassilParses natural language sentences into…
permissive · top 15,000 on PyPI
textractExtracts text from documents in multiple…
permissive · top 15,000 on PyPI