Examples#
The examples in this section show how to use PyHPS Data Transfer to interact in Python with a data transfer service. Each example consists of a Python script plus a data file.
You can use these command-line arguments to execute Python scripts:
--local-path
: Path to the files or directory to transfer. This argument supports wildcards. The default isNone
.--remote-path
: Optional path to the remote directory to transfer files to. The default isNone
.--url
: HPS URL to connect to. The default ishttps://localhost:8443/hps
.--username
: HPS username. The default isrepadmin
.--password
: HPS password. The default isrepadmin
.--debug
: Enable debug logging. The default isno-debug
.
Basic usage examples#
These examples show how to use PyHPS Data Transfer to run file operations both synchronously and asynchronously.
Set and query permissions#
This example shows how to set and query permissions on files stored in the remote backend.
Start PyHPS Data Transfer#
This example shows how to create a data transfer API object using a client and then check for available storages.
Transfer files using PyHPS Data Transfer#
This example shows some of the main data transfer client calls, like how to transfer files to remote backends, list files on a given path, and download a file from remote backends to local storage.