### Navigation

- index
- modules |
- FireWorks 0.66 documentation »

# firetasks Package

## `firetasks` Package

## `fileio_tasks` Module

class `fireworks.user_objects.firetasks.fileio_tasks.``FileDeleteTask`(*args, **kwargs)

  Bases: `fireworks.core.firework.FireTaskBase`

  A FireTask to delete files: Required params:

  > - files_to_delete: ([str]) Filenames to delete

  Optional params:
    - dest: (str) Shared path for files
  `required_params` = ['files_to_delete']
  `run_task`(fw_spec)

class `fireworks.user_objects.firetasks.fileio_tasks.``FileTransferTask`(*args, **kwargs)

  Bases: `fireworks.core.firework.FireTaskBase`

  A FireTask to Transfer files: Required params:

  > - mode: (str) - move, mv, copy, cp, copy2, copytree, copyfile, rtransfer
  > - files: ([str]) - source files
  > - dest: (str) destination directory

  Optional params:
    - server: (str) server host for remote transfer
    - key_filename: (str) optional SSH key location for remote transfer
  `fn_list` = {'copyfile': <function copyfile at 0x10eaaa848>, 'cp': <function copy at 0x10eaaa9b0>, 'copy2': <function copy2 at 0x10eaaaa28>, 'move': <function move at 0x10eaaac80>, 'mv': <function move at 0x10eaaac80>, 'copytree': <function copytree at 0x10eaaab18>, 'copy': <function copy at 0x10eaaa9b0>}
  `required_params` = ['mode', 'files', 'dest']
  `run_task`(fw_spec)

class `fireworks.user_objects.firetasks.fileio_tasks.``FileWriteTask`(*args, **kwargs)

  Bases: `fireworks.core.firework.FireTaskBase`

  A FireTask to write files: Required params:

  > - files_to_write: ([{filename:(str), contents:(str)}]) List of dicts with filenames and contents

  Optional params:
    - dest: (str) Shared path for files
  `required_params` = ['files_to_write']
  `run_task`(fw_spec)

## `script_task` Module

class `fireworks.user_objects.firetasks.script_task.``ScriptTask`(*args, **kwargs)

  Bases: `fireworks.core.firework.FireTaskBase`

  classmethod `from_str`(shell_cmd, parameters=None)
  `required_params` = ['script']
  `run_task`(fw_spec)

## `templatewriter_task` Module

This module contains the TemplateWriterTask, which writes files based on a template file and a Context using Jinja2’s templating engine.

class `fireworks.user_objects.firetasks.templatewriter_task.``TemplateWriterTask`(*args, **kwargs)

  Bases: `fireworks.core.firework.FireTaskBase`

  Task to write templated files via Jinja2 library Required parameters:

  > - template_file: (str) - path to template file
  > - context: (dict) - variable replacements for the template file
  > - output_file: (str) - output file

  Optional parameters:
    - append: (bool) - append to output file (instead of overwrite)
    - template_dir: (str) - directory in which to find the template file
  `run_task`(fw_spec)

## `unittest_tasks` Module

class `fireworks.user_objects.firetasks.unittest_tasks.``ExportTestSerializer`(a)

  Bases: `fireworks.utilities.fw_serializers.FWSerializable`

  `__init__`(a)
  classmethod `from_dict`(m_dict)
  `to_dict`()

class `fireworks.user_objects.firetasks.unittest_tasks.``TestSerializer`(a, m_date)

  Bases: `fireworks.utilities.fw_serializers.FWSerializable`

  `__init__`(a, m_date)
  classmethod `from_dict`(m_dict)
  `to_dict`(*args, **kwargs)

## Subpackages

- tests Package
  - `tests` Package
  - `test_fileio_tasks` Module

### Navigation

- index
- modules |
- FireWorks 0.66 documentation »