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: object

Client arguments.

args: list[str]

--args -a <args>

Arguments passed to the executable.

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_ORIGIN

Domain name. Should match the origins set in the server’s PSYNC_ORIGINS variable.

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_FILE

Optional 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.

rsync_url() str

{server_ip}:{server_dest}/{project_hash}

server_dest: str = '/home/psync'

environ: PSYNC_SERVER_DEST

Base path on the server where the files should be synced.

server_ip: str = '127.0.0.1'

environ: PSYNC_SERVER_IP

Server IP address.

server_port: int = 5000

environ: PSYNC_SERVER_PORT

Server port.

server_ssh_port: int = 5022

environ: PSYNC_SSH_PORT

SSH port on the server host. Client must be authenticated with a shared public key.

ssh_args: str = '-l psync'

environ: PSYNC_SSH_ARGS

Arguments passed to SSH. Under the hood, psync runs rsync -e "/usr/bin/ssh {PSYNC_SSH_ARGS} -p {PSYNC_SSH_PORT}"

ssl_cert_path: str = '~/.local/share/psync/cert.pem'

environ: PSYNC_CERT_PATH

Public SSL certificate used to trust the psync server.

target_path: str

<target_path>

Required. Path to the target executable.

client.args.parse_args(input: list[str] | None = None) Args