:orphan: 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 is ``None``. * ``--remote-path``: Optional path to the remote directory to transfer files to. The default is ``None``. * ``--url``: HPS URL to connect to. The default is ``https://localhost:8443/hps``. * ``--username``: HPS username. The default is ``repadmin``. * ``--password``: HPS password. The default is ``repadmin``. * ``--debug``: Enable debug logging. The default is ``no-debug``. .. raw:: html
.. thumbnail-parent-div-open .. thumbnail-parent-div-close .. raw:: html
Basic usage examples ==================== These examples show how to use PyHPS Data Transfer to run file operations both synchronously and asynchronously. .. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/basic/images/thumb/sphx_glr_01_async_data_transfer_client_thumb.png :alt: :ref:`sphx_glr_examples_basic_01_async_data_transfer_client.py` .. raw:: html
Run file operations asynchronously
.. raw:: html
.. only:: html .. image:: /examples/basic/images/thumb/sphx_glr_00_file_operations_client_thumb.png :alt: :ref:`sphx_glr_examples_basic_00_file_operations_client.py` .. raw:: html
Run file operations synchronously
.. thumbnail-parent-div-close .. raw:: html
Set and query permissions ========================== This example shows how to set and query permissions on files stored in the remote backend. .. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/permissions/images/thumb/sphx_glr_set_permissions_example_thumb.png :alt: :ref:`sphx_glr_examples_permissions_set_permissions_example.py` .. raw:: html
Set and query permissions
.. thumbnail-parent-div-close .. raw:: html
Start PyHPS Data Transfer ========================= This example shows how to create a data transfer API object using a client and then check for available storages. .. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/startup/images/thumb/sphx_glr_data_transfer_runner_thumb.png :alt: :ref:`sphx_glr_examples_startup_data_transfer_runner.py` .. raw:: html
Start PyHPS Data Transfer
.. thumbnail-parent-div-close .. raw:: html
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. .. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/transfer_files/images/thumb/sphx_glr_transfer_files_thumb.png :alt: :ref:`sphx_glr_examples_transfer_files_transfer_files.py` .. raw:: html
Transfer files
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: :includehidden: /examples/basic/index.rst /examples/permissions/index.rst /examples/startup/index.rst /examples/transfer_files/index.rst