Skip to content
Back to top
View this page

# `aiida.transports`

## Package Contents

### Classes

`SshTransport` |
`Transport` |

### Functions

`convert_to_bool` |
`parse_sshconfig` |

### API

class aiida.transports.SshTransport(*args, **kwargs)

  Bases: `aiida.transports.transport.Transport`

  Initialization

  _valid_connect_options = [('username',), ('port',), ('look_for_keys',), ('key_filename',), ('timeout',), ('allow_agent',), ('...
  _valid_connect_params = None
  _valid_auth_options = None
  _MAX_EXEC_COMMAND_LOG_SIZE = None
  classmethod _get_username_suggestion_string(computer)
  classmethod _get_port_suggestion_string(computer)
  classmethod _get_key_filename_suggestion_string(computer)
  classmethod _get_timeout_suggestion_string(computer)
  classmethod _get_allow_agent_suggestion_string(computer)
  classmethod _get_look_for_keys_suggestion_string(computer)
  classmethod _get_proxy_command_suggestion_string(computer)
  classmethod _get_proxy_jump_suggestion_string(_)
  classmethod _get_compress_suggestion_string(computer)
  classmethod _get_load_system_host_keys_suggestion_string(computer)
  classmethod _get_key_policy_suggestion_string(computer)
  classmethod _get_gss_auth_suggestion_string(computer)
  classmethod _get_gss_kex_suggestion_string(computer)
  classmethod _get_gss_deleg_creds_suggestion_string(computer)
  classmethod _get_gss_host_suggestion_string(computer)
  open()
  _close_proxies()
  close()
  property sshclient
  property sftp
  __str__()
  chdir(path)
  normalize(path='.')
  stat(path)
  lstat(path)
  getcwd()
  makedirs(path, ignore_existing=False)
  mkdir(path, ignore_existing=False)
  rmtree(path)
  rmdir(path)
  abstractmethod chown(path, uid, gid)
  isdir(path)
  chmod(path, mode)
  static _os_path_split_asunder(path)
  put(localpath, remotepath, callback=None, dereference=True, overwrite=True, ignore_nonexisting=False)
  putfile(localpath, remotepath, callback=None, dereference=True, overwrite=True)
  puttree(localpath, remotepath, callback=None, dereference=True, overwrite=True)
  get(remotepath, localpath, callback=None, dereference=True, overwrite=True, ignore_nonexisting=False)
  getfile(remotepath, localpath, callback=None, dereference=True, overwrite=True)
  gettree(remotepath, localpath, callback=None, dereference=True, overwrite=True)
  get_attribute(path)
  copyfile(remotesource, remotedestination, dereference=False)
  copytree(remotesource, remotedestination, dereference=False)
  copy(remotesource, remotedestination, dereference=False, recursive=True)
  _exec_cp(cp_exe, cp_flags, src, dst)
  static _local_listdir(path, pattern=None)
  listdir(path='.', pattern=None)
  remove(path)
  rename(oldpath, newpath)
  isfile(path)
  _exec_command_internal(command, combine_stderr=False, bufsize=-1)
  exec_command_wait_bytes(command, stdin=None, combine_stderr=False, bufsize=-1)
  gotocomputer_command(remotedir)
  _symlink(source, dest)
  symlink(remotesource, remotedestination)
  path_exists(path)

class aiida.transports.Transport(*args, **kwargs)

  Bases: `abc.ABC`

  Initialization

  DEFAULT_MINIMUM_JOB_POLL_INTERVAL = 10
  _DEFAULT_SAFE_OPEN_INTERVAL = 30.0
  _valid_auth_params = None
  _MAGIC_CHECK = None
  _valid_auth_options: list = []
  _common_auth_options = [('use_login_shell',), ('safe_interval',)]
  __enter__()
  __exit__(type_, value, traceback)
  property is_open
  abstractmethod open()
  abstractmethod close()
  __repr__()
  __str__()
  set_logger_extra(logger_extra)
  classmethod get_short_doc()
  classmethod get_valid_auth_params()
  auth_options() → collections.OrderedDict
  classmethod _get_safe_interval_suggestion_string(computer)
  classmethod _get_use_login_shell_suggestion_string(computer)
  property logger
  get_safe_open_interval()
  abstractmethod chdir(path)
  abstractmethod chmod(path, mode)
  abstractmethod chown(path, uid, gid)
  abstractmethod copy(remotesource, remotedestination, dereference=False, recursive=True)
  abstractmethod copyfile(remotesource, remotedestination, dereference=False)
  abstractmethod copytree(remotesource, remotedestination, dereference=False)
  copy_from_remote_to_remote(transportdestination, remotesource, remotedestination, **kwargs)
  abstractmethod _exec_command_internal(command, **kwargs)
  abstractmethod exec_command_wait_bytes(command, stdin=None, **kwargs)
  exec_command_wait(command, stdin=None, encoding='utf-8', **kwargs)
  abstractmethod get(remotepath, localpath, *args, **kwargs)
  abstractmethod getfile(remotepath, localpath, *args, **kwargs)
  abstractmethod gettree(remotepath, localpath, *args, **kwargs)
  abstractmethod getcwd()
  abstractmethod get_attribute(path)
  get_mode(path)
  abstractmethod isdir(path)
  abstractmethod isfile(path)
  abstractmethod listdir(path='.', pattern=None)
  listdir_withattributes(path='.', pattern=None)
  abstractmethod makedirs(path, ignore_existing=False)
  abstractmethod mkdir(path, ignore_existing=False)
  abstractmethod normalize(path='.')
  abstractmethod put(localpath, remotepath, *args, **kwargs)
  abstractmethod putfile(localpath, remotepath, *args, **kwargs)
  abstractmethod puttree(localpath, remotepath, *args, **kwargs)
  abstractmethod remove(path)
  abstractmethod rename(oldpath, newpath)
  abstractmethod rmdir(path)
  abstractmethod rmtree(path)
  abstractmethod gotocomputer_command(remotedir)
  abstractmethod symlink(remotesource, remotedestination)
  whoami()
  abstractmethod path_exists(path)
  glob(pathname)
  iglob(pathname)
  glob1(dirname, pattern)
  glob0(dirname, basename)
  has_magic(string)
  _gotocomputer_string(remotedir)

aiida.transports.convert_to_bool(string)

aiida.transports.parse_sshconfig(computername)