waft.cli.sftp module¶
- class waft.cli.sftp.FileTransfer(action: str, target: str)¶
Bases:
objectDisplay 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 0x7fdfdf3fc0d0>], mode: ~typing.Annotated[int, <typer.models.ArgumentInfo object at 0x7fdfdf3fc090>])¶
Change remote file modes/permissions.
- waft.cli.sftp.chown(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7fdfdf3fc290>], uid: ~typing.Annotated[int | None, <typer.models.OptionInfo object at 0x7fdfdf3fc310>] = None, gid: ~typing.Annotated[int | None, <typer.models.OptionInfo object at 0x7fdfdf3fc350>] = None)¶
Change remote file owner and/or group ID.
- waft.cli.sftp.get(remotepath: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7fdfdf59fd50>], localpath: ~pathlib.Annotated[~pathlib.Path, <typer.models.ArgumentInfo object at 0x7fdfdf59fdd0>])¶
Download the remote-path to the local machine.
- waft.cli.sftp.listdir(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7fdfdf59d390>] = '.', long: ~typing.Annotated[bool, <typer.models.OptionInfo object at 0x7fdfdf59e510>] = False)¶
Display a remote directory listing.
- waft.cli.sftp.lstat(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7fdfdf518610>])¶
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 0x7fdfdf51bc10>], mode: ~typing.Annotated[int | None, <typer.models.ArgumentInfo object at 0x7fdfdf51b910>] = 777)¶
Create remote directory.
- waft.cli.sftp.put(localpath: ~pathlib.Annotated[~pathlib.Path, <typer.models.ArgumentInfo object at 0x7fdfdf59f010>], remotepath: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7fdfdf59f490>])¶
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 0x7fdfdf59c1d0>])¶
Display contents of a file on the remote server.
- waft.cli.sftp.remove(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7fdfdf57e850>])¶
Delete remote file.
- waft.cli.sftp.rename(oldpath: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7fdfdf57f0d0>], newpath: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7fdfdf57f090>])¶
Rename the path of a remote file or folder.
- waft.cli.sftp.rmdir(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7fdfdf57fc10>])¶
Remove remote directory.
- waft.cli.sftp.stat(path: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7fdfdf57efd0>])¶
Displays file status information on the remote system; resolves symbolic links to status the file it references.
- waft.cli.sftp.symlink(source: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7fdfdf519c50>], target: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x7fdfdf51b450>])¶
Create a symbolic link on the remote system.