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 0x7f7858fae7d0>], mode: ~typing.Annotated[int, <typer.models.ArgumentInfo object at 0x7f7858fae850>])

Change remote file modes/permissions.

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

Change remote file owner and/or group ID.

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

Download the remote-path to the local machine.

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

Display a remote directory listing.

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

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 0x7f7858fae110>], mode: ~typing.Annotated[int | None, <typer.models.ArgumentInfo object at 0x7f7858fae190>] = 777)

Create remote directory.

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

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 0x7f7858fadad0>])

Display contents of a file on the remote server.

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

Delete remote file.

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

Rename the path of a remote file or folder.

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

Remove remote directory.

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

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.