:orphan: Examples ======== The examples in this section show how to use PyHPS Data Transfer to interact with data transfer service in Python. Each example consists of a Python script plus a data file. You can execute many Python scripts with these command-line arguments: * ``--local-path``: Path to the files or directory to transfer. Supports wildcards (default: None) [required] * ``--remote-path``: Optional path to the remote directory to transfer files to (default: None) * ``--url``: HPS URL to connect to [default: https://localhost:8443/hps] * ``--username``: HPS username (default: repadmin) * ``--password``: HPS password (default: repadmin) * ``--debug``: Enable debug logging [default: 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 for file operations and how to set up and use a asynchronous client for data transfer operations .. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/basic/images/thumb/sphx_glr_async_data_transfer_client_thumb.png :alt: :ref:`sphx_glr_examples_basic_async_data_transfer_client.py` .. raw:: html
Run Async
.. raw:: html
.. only:: html .. image:: /examples/basic/images/thumb/sphx_glr_file_operations_client_thumb.png :alt: :ref:`sphx_glr_examples_basic_file_operations_client.py` .. raw:: html
File Operations
.. thumbnail-parent-div-close .. raw:: html
Set and query permissions ========================== This example script shows how to set and query permissions on files stored in 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
Startup PyHPS Data Transfer ==================================== This example demonstrates how to create a data transfer api object using a client and 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
Startup 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 how to download file from remote backends onto 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
Basic script to 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