# cwl_utils.types

Shared Python type definitions for commons JSON like CWL objects.

## Attributes

`built_in_types` |
`CWLDirectoryType` |
`CWLFileType` |
`CWLOutputType` |
`CWLObjectType` |
`SinkType` |

## Classes

`CWLRuntimeParameterContext` | dict() -> new empty dictionary
`CWLParameterContext` | dict() -> new empty dictionary
`DirentType` | dict() -> new empty dictionary

## Functions

`is_cwl_parameter_context_key`(key) |
`is_directory`(value) |
`is_directory_key`(key) |
`is_file`(value) |
`is_file_key`(key) |
`is_file_or_directory`(value) |

## Module Contents

cwl_utils.types.built_in_types: list[str] = ['null', 'boolean', 'int', 'long', 'float', 'double', 'string', 'File', 'Directory', 'stdin',...

cwl_utils.types.CWLDirectoryType

cwl_utils.types.CWLFileType

type cwl_utils.types.CWLOutputType = bool | str | int | float | CWLFileType | CWLDirectoryType | MutableSequence['CWLOutputType | None'] | MutableMapping[str, 'CWLOutputType | None']

type cwl_utils.types.CWLObjectType = MutableMapping[str, CWLOutputType | None]

type cwl_utils.types.SinkType = CWLOutputType | CWLObjectType

class cwl_utils.types.CWLRuntimeParameterContext

  Bases: `TypedDict`

  digraph inheritance54502889ec { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "CWLRuntimeParameterContext" [URL="#cwl_utils.types.CWLRuntimeParameterContext",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "TypedDict" -> "CWLRuntimeParameterContext" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TypedDict" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; }

  dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

  > (key, value) pairs

  dict(iterable) -> new dictionary initialized as if via:

    d = {} for k, v in iterable:

    > d[k] = v

  dict(**kwargs) -> new dictionary initialized with the name=value pairs

    in the keyword argument list. For example: dict(one=1, two=2)

  outdir: str
  tmpdir: str
  cores: float | str
  ram: float | str
  outdirSize: float | str
  tmpdirSize: float | str
  exitCode: int

class cwl_utils.types.CWLParameterContext

  Bases: `TypedDict`

  digraph inheritance711252163b { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "CWLParameterContext" [URL="#cwl_utils.types.CWLParameterContext",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "TypedDict" -> "CWLParameterContext" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TypedDict" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; }

  dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

  > (key, value) pairs

  dict(iterable) -> new dictionary initialized as if via:

    d = {} for k, v in iterable:

    > d[k] = v

  dict(**kwargs) -> new dictionary initialized with the name=value pairs

    in the keyword argument list. For example: dict(one=1, two=2)

  inputs: CWLObjectType
  self: CWLOutputType | None
  runtime: CWLRuntimeParameterContext

class cwl_utils.types.DirentType

  Bases: `TypedDict`

  digraph inheritance4298480a51 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "DirentType" [URL="#cwl_utils.types.DirentType",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "TypedDict" -> "DirentType" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TypedDict" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled"]; }

  dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

  > (key, value) pairs

  dict(iterable) -> new dictionary initialized as if via:

    d = {} for k, v in iterable:

    > d[k] = v

  dict(**kwargs) -> new dictionary initialized with the name=value pairs

    in the keyword argument list. For example: dict(one=1, two=2)

  entry: Required[str]
  entryname: str
  writable: bool

cwl_utils.types.is_cwl_parameter_context_key(key)
  Parameters:

    key (Any)

  Return type:

    TypeGuard[Literal[‘inputs’, ‘self’, ‘runtime’]]

cwl_utils.types.is_directory(value)
  Parameters:

    value (Any)

  Return type:

    TypeIs[CWLDirectoryType]

cwl_utils.types.is_directory_key(key)
  Parameters:

    key (Any)

  Return type:

    TypeGuard[Literal[‘class’, ‘location’, ‘path’, ‘basename’, ‘listing’]]

cwl_utils.types.is_file(value)
  Parameters:

    value (Any)

  Return type:

    TypeIs[CWLFileType]

cwl_utils.types.is_file_key(key)
  Parameters:

    key (Any)

  Return type:

    TypeGuard[Literal[‘class’, ‘location’, ‘path’, ‘basename’, ‘dirname’, ‘nameroot’, ‘nameext’, ‘checksum’, ‘size’, ‘secondaryFiles’, ‘format’, ‘contents’]]

cwl_utils.types.is_file_or_directory(value)
  Parameters:

    value (Any)

  Return type:

    TypeIs[CWLFileType | CWLDirectoryType]