Required
remotepath| Type: | str |
| Description: | Remote path. |
class LocalSFTPClient(builtins.object):
def __init__(self): ...def close(self) -> None: ...def get(
self, remotepath: str, localpath: str, callback: typing.Callable | None
) -> None: ...| Type: | str |
| Description: | Remote path. |
| Type: | str |
| Description: | Local path. |
| Type: | typing.Callable | None |
| Description: | Callback function. |
def getfo(
self, remotepath: str, fl: typing.IO, callback: typing.Callable | None
) -> None: ...| Type: | str |
| Description: | Remote path. |
| Type: | typing.IO |
| Description: | Open file handle. |
| Type: | typing.Callable | None |
| Description: | Callback function. |
def listdir(self, path: str) -> list[str]: ...| Type: | str |
| Description: | The path. |
def mkdir(self, path: str, mode: int = 511) -> None: ...| Type: | str |
| Description: | The path. |
| Type: | int |
| Default value: | 511 |
| Description: | Permission mode. |
def put(
self, localpath: str, remotepath: str, callback: typing.Callable | None
) -> None: ...| Type: | str |
| Description: | Local file. |
| Type: | str |
| Description: | Remote path. |
| Type: | typing.Callable | None |
| Description: | Callback function. |
def putfo(
self, fl: typing.IO, remotepath: str, callback: typing.Callable | None
) -> None: ...| Type: | typing.IO |
| Description: | Open file handle. |
| Type: | str |
| Description: | Remote path. |
| Type: | typing.Callable | None |
| Description: | Callback function. |
def rmdir(self, path: str) -> None: ...| Type: | str |
| Description: | The path. |
def stat(self, path: str) -> os.stat_result: ...| Type: | str |
| Description: | The path. |
def unlink(self, path: str) -> None: ...| Type: | str |
| Description: | The path. |
class LocalSSHClient(builtins.object):
def __init__(self): ...def close(self) -> None: ...def connect(self) -> None: ...def exec_command(self) -> None: ...def load_system_host_keys(self) -> None: ...def open_sftp(self) -> None: ...def set_missing_host_key_policy(self) -> None: ...class OSType(enum.Enum):
def __init__(self): ...class RemoteIOExecutor(builtins.object):
def __init__(self): ...type[pathlib.PurePosixPath | pathlib.PureWindowsPath])-Returns the type of file paths for the given site.pathlib.PurePosixPath | pathlib.PureWindowsPath)-The home directory.OSType)-Returns the type of the operating system.
Subclasses can overwrite this.paramiko.sftp_client.SFTPClient | LocalSFTPClient)-Get the sftp client instance.
Will be initialized upon the first access.paramiko.client.SSHClient | LocalSSHClient)-Get the ssh client instance.
Will be initialized upon the first access.def execute_command(
self,
command: str,
assert_ok: bool = True,
environment: dict[str, str] | None = None,
) -> tuple[int, list[str], list[str]]: ...| Type: | str |
| Description: | The command to run as a string. |
| Type: | bool |
| Default value: | True |
| Description: | Raise if the command does not exist with a code of 0. |
| Type: | dict[str, str] | None |
| Default value: | None |
| Description: | Environment variables to be set for this command. |
def is_folder_writeable(self, path: _RemotePathInputType) -> bool: ...| Type: | _RemotePathInputType |
| Description: | Path on the remote machine. |
def remote_exists(self, path: _RemotePathInputType) -> bool: ...| Type: | _RemotePathInputType |
| Description: | Path to check. |
def remote_get(
self,
remotepath: _RemotePathInputType,
localpath: io.BytesIO | pathlib.Path,
show_progressbar: bool = False,
) -> None: ...| Type: | _RemotePathInputType |
| Description: | Remote file to get. |
| Type: | io.BytesIO | pathlib.Path |
| Description: | Local path to save to Can be a file or a file like object. |
| Type: | bool |
| Default value: | False |
| Description: | Show a progressbar or not. |
def remote_listdir(self, path: _RemotePathInputType) -> list[str]: ...| Type: | _RemotePathInputType |
| Description: | Remote path whose contents to list. |
def remote_mkdir(
self, path: _RemotePathInputType, mode: int = 511
) -> None: ...| Type: | _RemotePathInputType |
| Description: | Directory to create. |
| Type: | int |
| Default value: | 511 |
| Description: | Permissions for the new directory. |
def remote_put(
self,
localpath: io.BytesIO | pathlib.Path,
remotepath: _RemotePathInputType,
show_progressbar: bool = False,
) -> None: ...| Type: | io.BytesIO | pathlib.Path |
| Description: | Local file to copy. Can be a file like object. |
| Type: | _RemotePathInputType |
| Description: | Where to copy to. |
| Type: | bool |
| Default value: | False |
| Description: | Show a progressbar or not. |
def remote_rmdir(
self, path: _RemotePathInputType, verbosity: int = 1
) -> None: ...| Type: | _RemotePathInputType |
| Description: | Remote path to delete. |
| Type: | int |
| Default value: | 1 |
| Description: | Verbosity level. |
def safe_remote_rmdir(
self, path: _RemotePathInputType, allow_failure: bool, verbosity: int = 1
) -> None: ...| Type: | _RemotePathInputType |
| Description: | Remote path to delete. |
| Type: | bool |
| Description: | Whether to allow failure or not. |
| Type: | int |
| Default value: | 1 |
| Description: | Verbosity level. |