kkrunner.remote.Transport

class kkrunner.remote.Transport[source]

Bases: object

Run commands and move files on one target machine.

Transport operations are asynchronous because remote execution is mostly I/O. put_file() and get_file() are exact one-file primitives. put_files() and get_files() accept one path/pattern or an iterable and preserve each matched file’s path relative to the supplied source root. Wildcards are always expanded on the source side of the transfer.

async run(argv, *, cwd=None, input=None, check=True)[source]
async start(argv, *, cwd=None, stdin=None)[source]
Return type:

RunningCommand

async put_file(source, destination)[source]
async get_file(source, destination)[source]
async put_files(sources, source_root, destination_root)[source]
async get_files(sources, source_root, destination_root)[source]
async expand_files(sources, root)[source]

Expand paths/patterns on the target filesystem into concrete files.

async query_files(sources, *, root=None, digest=False)[source]

Query literal paths, or expand root-confined patterns, in one batch.

async read_file(path)[source]
async file_digest(path)[source]

Return the SHA-256 digest of path, or None if it does not exist.

async file_signature(path)[source]

Return (size, mtime_ns) for path, or None if absent.