client.args¶
- class client.args.Args(target_path: str, assets: list[str] = <factory>, env: dict[str, str] = <factory>, args: list[str] = <factory>, server_ip: str = '127.0.0.1', server_port: int = 5000, server_ssh_port: int = 5022, ssh_args: str = '-l psync', server_dest: str = '/home/psync', ssl_cert_path: str = '~/.local/share/psync/cert.pem', client_origin: str = '127.0.0.1', logfile: ~typing.Any = None)¶
Bases:
objectClient arguments.
- assets: list[str]¶
--assets -A <env>Extra files or directories to be synced to the destination path.
- client_origin: str = '127.0.0.1'¶
environ:
PSYNC_CLIENT_ORIGINDomain name. Should match the origins set in the server’s
PSYNC_ORIGINSvariable.
- destination_path() Path¶
{server_dest}/{project_hash}/{basename(target_path)}
- env: dict[str, str]¶
--env -e <env>Space separated list of environment variables which will be passed to the executable.
- logfile: Any = None¶
environ:
PSYNC_LOG_FILEOptional file where the executable’s logs will be output.
- project_hash() str¶
Hash value generated from the target path. Used as the directory name for the project.
- server_dest: str = '/home/psync'¶
environ:
PSYNC_SERVER_DESTBase path on the server where the files should be synced.
- server_ssh_port: int = 5022¶
environ:
PSYNC_SSH_PORTSSH port on the server host. Client must be authenticated with a shared public key.
- ssh_args: str = '-l psync'¶
environ:
PSYNC_SSH_ARGSArguments passed to SSH. Under the hood, psync runs
rsync -e "/usr/bin/ssh {PSYNC_SSH_ARGS} -p {PSYNC_SSH_PORT}"