# cwltool.load_tool

Loads a CWL document.

## Attributes

`docloaderctx` |
`jobloader_id_name` |
`jobloaderctx` |
`overrides_ctx` |

## Functions

`default_loader`([fetcher_constructor, enable_dev, ...]) |
`resolve_tool_uri`(argsworkflow[, resolver, ...]) |
`fetch_document`(argsworkflow[, loadingContext]) | Retrieve a CWL document.
`update_index`(document_loader, pr) |
`fast_parser`(workflowobj, fileuri, uri, loadingContext, ...) |
`resolve_and_validate_document`(loadingContext, ...[, ...]) | Validate a CWL document.
`make_tool`(uri, loadingContext) | Make a Python CWL object.
`load_tool`(argsworkflow[, loadingContext]) |
`resolve_overrides`(ov, ov_uri, baseurl) |
`load_overrides`(ov, base_url) | Load and resolve any overrides.
`recursive_resolve_and_validate_document`(...[, ...]) | Validate a CWL document, checking that a tool object can be built.

## Module Contents

cwltool.load_tool.docloaderctx: schema_salad.utils.ContextType

cwltool.load_tool.jobloader_id_name = '__id'

cwltool.load_tool.jobloaderctx: schema_salad.utils.ContextType

cwltool.load_tool.overrides_ctx: schema_salad.utils.ContextType

cwltool.load_tool.default_loader(fetcher_constructor=None, enable_dev=False, doc_cache=True)
  Parameters:

    - fetcher_constructor (schema_salad.utils.FetcherCallableType | None)

    - enable_dev (bool)

    - doc_cache (bool)

  Return type:

    schema_salad.ref_resolver.Loader

cwltool.load_tool.resolve_tool_uri(argsworkflow, resolver=None, fetcher_constructor=None, document_loader=None)
  Parameters:

    - argsworkflow (str)

    - resolver (cwltool.utils.ResolverType | None)

    - fetcher_constructor (schema_salad.utils.FetcherCallableType | None)

    - document_loader (schema_salad.ref_resolver.Loader | None)

  Return type:

    tuple[str, str]

cwltool.load_tool.fetch_document(argsworkflow, loadingContext=None)

  Retrieve a CWL document.

  Parameters:

    - argsworkflow (str | cwl_utils.types.CWLObjectType)

    - loadingContext (cwltool.context.LoadingContext | None)

  Return type:

    tuple[cwltool.context.LoadingContext, ruamel.yaml.comments.CommentedMap, str]

cwltool.load_tool.update_index(document_loader, pr)
  Parameters:

    - document_loader (schema_salad.ref_resolver.Loader)

    - pr (ruamel.yaml.comments.CommentedMap)

  Return type:

    None

cwltool.load_tool.fast_parser(workflowobj, fileuri, uri, loadingContext, fetcher)
  Parameters:

    - workflowobj (ruamel.yaml.comments.CommentedMap | ruamel.yaml.comments.CommentedSeq | None)

    - fileuri (str | None)

    - uri (str)

    - loadingContext (cwltool.context.LoadingContext)

    - fetcher (schema_salad.fetcher.Fetcher)

  Return type:

    tuple[ruamel.yaml.comments.CommentedMap | ruamel.yaml.comments.CommentedSeq, ruamel.yaml.comments.CommentedMap]

cwltool.load_tool.resolve_and_validate_document(loadingContext, workflowobj, uri, preprocess_only=False)

  Validate a CWL document.

  Parameters:

    - loadingContext (cwltool.context.LoadingContext)

    - workflowobj (ruamel.yaml.comments.CommentedMap | ruamel.yaml.comments.CommentedSeq)

    - uri (str)

    - preprocess_only (bool)

  Return type:

    tuple[cwltool.context.LoadingContext, str]

cwltool.load_tool.make_tool(uri, loadingContext)

  Make a Python CWL object.

  Parameters:

    - uri (str | ruamel.yaml.comments.CommentedMap | ruamel.yaml.comments.CommentedSeq)

    - loadingContext (cwltool.context.LoadingContext)

  Return type:

    cwltool.process.Process

cwltool.load_tool.load_tool(argsworkflow, loadingContext=None)
  Parameters:

    - argsworkflow (str | cwl_utils.types.CWLObjectType)

    - loadingContext (cwltool.context.LoadingContext | None)

  Return type:

    cwltool.process.Process

cwltool.load_tool.resolve_overrides(ov, ov_uri, baseurl)
  Parameters:

    - ov (schema_salad.utils.IdxResultType)

    - ov_uri (str)

    - baseurl (str)

  Return type:

    list[cwl_utils.types.CWLObjectType]

cwltool.load_tool.load_overrides(ov, base_url)

  Load and resolve any overrides.

  Parameters:

    - ov (str)

    - base_url (str)

  Return type:

    list[cwl_utils.types.CWLObjectType]

cwltool.load_tool.recursive_resolve_and_validate_document(loadingContext, workflowobj, uri, preprocess_only=False)

  Validate a CWL document, checking that a tool object can be built.

  Parameters:

    - loadingContext (cwltool.context.LoadingContext)

    - workflowobj (ruamel.yaml.comments.CommentedMap | ruamel.yaml.comments.CommentedSeq)

    - uri (str)

    - preprocess_only (bool)

  Return type:

    tuple[cwltool.context.LoadingContext, str, cwltool.process.Process]