waft.cli.sftp module

class waft.cli.sftp.FileTransfer(action: str, target: str)

Bases: object

Display progress bar to track file transfer.

update(bytes_transferred: int, bytes_total: int)

Update progress bar to track file transfer progress.

waft.cli.sftp.chmod(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50dac4e950>], mode: ~typing.Annotated[int, <typer.models.ArgumentInfo object at 0x7f50dac4e9d0>])

Change remote file modes/permissions.

waft.cli.sftp.chown(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50dac4ec90>], uid: ~typing.Annotated[int | None, <typer.models.OptionInfo object at 0x7f50dac4ed10>] = None, gid: ~typing.Annotated[int | None, <typer.models.OptionInfo object at 0x7f50dac4ee90>] = None)

Change remote file owner and/or group ID.

waft.cli.sftp.get(remotepath: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50dac4d650>], localpath: ~pathlib.Annotated[~pathlib.Path, <typer.models.ArgumentInfo object at 0x7f50dacd1350>])

Download the remote-path to the local machine.

waft.cli.sftp.listdir(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50dac4da90>] = '.', long: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7f50dad0eb50>] = False)

Display a remote directory listing.

waft.cli.sftp.lstat(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50dac4e590>])

Displays file status information on the remote system; does not resolve symbolic links.

waft.cli.sftp.mkdir(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50dac4e2d0>], mode: ~typing.Annotated[int | None, <typer.models.ArgumentInfo object at 0x7f50dacd04d0>] = 777)

Create remote directory.

waft.cli.sftp.put(localpath: ~pathlib.Annotated[~pathlib.Path, <typer.models.ArgumentInfo object at 0x7f50dac4d850>], remotepath: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50dac4d8d0>])

Upload local-path to the remote machine(s).

waft.cli.sftp.pwd()

Display remote working directory.

waft.cli.sftp.read(filename: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50dac4dc90>])

Display contents of a file on the remote server.

waft.cli.sftp.remove(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50dac4e050>])

Delete remote file.

waft.cli.sftp.rename(oldpath: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50dac4de10>], newpath: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50dac4de90>])

Rename the path of a remote file or folder.

waft.cli.sftp.rmdir(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50dac4e190>])

Remove remote directory.

waft.cli.sftp.stat(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7f50dac4ddd0>])

Displays file status information on the remote system; resolves symbolic links to status the file it references.

Create a symbolic link on the remote system.