Metadata-Version: 2.3
Name: ansys-hps-data-transfer-client
Version: 0.3.0
Summary: Python client library for hps data transfer service
Author-email: "ANSYS, Inc." <pyansys.core@ansys.com>
Maintainer-email: "ANSYS, Inc." <pyansys.core@ansys.com>
Requires-Python: >=3.10,<4.0
Description-Content-Type: text/x-rst
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Dist: pydantic>=2.7.1
Requires-Dist: httpx>=0.27.0,<0.28.0
Requires-Dist: backoff>=2.2.1
Requires-Dist: humanfriendly>=10.0
Requires-Dist: requests>=2.21.0
Requires-Dist: portend>=3.2.0
Requires-Dist: filelock>=3.14.0
Requires-Dist: psutil>=5.9.1
Requires-Dist: asyncio-atexit>=1.0.0
Requires-Dist: build==1.2.2.post1 ; extra == "build"
Requires-Dist: twine==6.1.0 ; extra == "build"
Requires-Dist: wheel ; extra == "build"
Requires-Dist: datamodel-code-generator==0.32.0 ; extra == "build"
Requires-Dist: pre-commit==4.2.0 ; extra == "build"
Requires-Dist: importlib_metadata>=7.0 ; extra == "build"
Requires-Dist: ansys-sphinx-theme==1.5.2 ; extra == "doc"
Requires-Dist: autodoc_pydantic==2.2.0 ; extra == "doc"
Requires-Dist: jupyter_sphinx==0.5.3 ; extra == "doc"
Requires-Dist: nbsphinx==0.9.7 ; extra == "doc"
Requires-Dist: numpydoc==1.8.0 ; extra == "doc"
Requires-Dist: Sphinx==8.1.3 ; extra == "doc"
Requires-Dist: sphinx-autoapi==3.6.0 ; extra == "doc"
Requires-Dist: sphinx-autodoc-typehints==3.0.1 ; extra == "doc"
Requires-Dist: sphinxcontrib-globalsubs==0.1.2 ; extra == "doc"
Requires-Dist: sphinxcontrib-httpdomain==1.8.1 ; extra == "doc"
Requires-Dist: sphinx-copybutton==0.5.2 ; extra == "doc"
Requires-Dist: sphinx_design==0.6.1 ; extra == "doc"
Requires-Dist: sphinx-jinja==2.0.2 ; extra == "doc"
Requires-Dist: sphinxnotes-strike==1.2.1 ; extra == "doc"
Requires-Dist: sphinx-tabs==3.4.7 ; extra == "doc"
Requires-Dist: sphinx-gallery==0.19.0 ; extra == "doc"
Requires-Dist: pytest==8.4.1 ; extra == "tests"
Requires-Dist: pytest-cov==6.2.1 ; extra == "tests"
Requires-Dist: pytest-timeout==2.4.0 ; extra == "tests"
Requires-Dist: pytest-mock-resources[redis]==2.12.2 ; extra == "tests"
Requires-Dist: pytest-rerunfailures==15.1 ; extra == "tests"
Requires-Dist: pytest-asyncio==1.1.0 ; extra == "tests"
Requires-Dist: python-keycloak==5.7.0 ; extra == "tests"
Requires-Dist: python-slugify>=8.0.4 ; extra == "tests"
Requires-Dist: tox==4.28.4 ; extra == "tests"
Project-URL: Documentation, https://data-transfer.hps.docs.pyansys.com
Project-URL: Homepage, https://github.com/ansys/pyhps-data-transfer/
Project-URL: Source, https://github.com/ansys/pyhps-data-transfer/
Project-URL: Tracker, https://github.com/ansys/pyhps-data-transfer/issues
Provides-Extra: build
Provides-Extra: doc
Provides-Extra: tests

PyHPS Data Transfer
==========================
|pyansys| |python| |pypi| |GH-CI| |codecov| |MIT| |ruff|

.. |pyansys| image:: https://img.shields.io/badge/Py-Ansys-ffc107.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAABDklEQVQ4jWNgoDfg5mD8vE7q/3bpVyskbW0sMRUwofHD7Dh5OBkZGBgW7/3W2tZpa2tLQEOyOzeEsfumlK2tbVpaGj4N6jIs1lpsDAwMJ278sveMY2BgCA0NFRISwqkhyQ1q/Nyd3zg4OBgYGNjZ2ePi4rB5loGBhZnhxTLJ/9ulv26Q4uVk1NXV/f///////69du4Zdg78lx//t0v+3S88rFISInD59GqIH2esIJ8G9O2/XVwhjzpw5EAam1xkkBJn/bJX+v1365hxxuCAfH9+3b9/+////48cPuNehNsS7cDEzMTAwMMzb+Q2u4dOnT2vWrMHu9ZtzxP9vl/69RVpCkBlZ3N7enoDXBwEAAA+YYitOilMVAAAAAElFTkSuQmCC
   :target: https://docs.pyansys.com/
   :alt: PyAnsys

.. |python| image:: https://img.shields.io/pypi/pyversions/ansys-hps-data-transfer-client?logo=pypi
   :target: https://pypi.org/project/ansys-hps-data-transfer-client/
   :alt: Python

.. |pypi| image:: https://img.shields.io/pypi/v/ansys-hps-data-transfer-client.svg?logo=python&logoColor=white
   :target: https://pypi.org/project/ansys-hps-data-transfer-client
   :alt: PyPI

.. |codecov| image:: https://codecov.io/gh/ansys/hps-data-transfer-client/branch/main/graph/badge.svg
   :target: https://codecov.io/gh/ansys/pyhps-data-transfer
   :alt: Codecov

.. |GH-CI| image:: https://github.com/ansys/hps-data-transfer-client/actions/workflows/ci_cd.yml/badge.svg
   :target: https://github.com/ansys/pyhps-data-transfer/actions/workflows/ci_cd.yml
   :alt: GH-CI

.. |MIT| image:: https://img.shields.io/badge/License-MIT-yellow.svg
   :target: https://opensource.org/licenses/MIT
   :alt: MIT

.. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
   :target: https://github.com/astral-sh/ruff
   :alt: Ruff


Overview
--------

PyHPS Data Transfer is a Python client library for the Ansys HPC Platform Services (HPS) data transfer service.

.. contribute_start

Installation
^^^^^^^^^^^^
You can use `pip <https://pypi.org/project/pip/>`_ to install PyHPS Data Transfer in user mode:

.. code:: bash

    pip install ansys-hps-data-transfer-client

To install the latest development version from the GitHub repository, run these commands:

.. code:: bash

    git clone https://github.com/ansys/pyhps-data-transfer/
    cd pyhps-data-transfer
    pip install -e .

For more information, see `Getting started`_.

Basic usage
^^^^^^^^^^^

The following sections show how to import PyHPS Data Transfer and use some basic capabilities.

Request access token
~~~~~~~~~~~~~~~~~~~~

The client library requires an access token to connect to the HPS Data Transfer service.

.. code:: python

    from ansys.hps.data_transfer.client.authenticate import authenticate

    auth_url = "https://localhost:8443/hps/auth/realms/rep"

    token = authenticate(username="repadmin", password="repadmin", verify=False, url=auth_url)
    token = token.get("access_token", None)

Connect to data transfer service client
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

After obtaining the access token, you can connect to the data transfer service client:

.. code:: python

    from ansys.hps.data_transfer.client import Client    # Import the Client class
    dt_url = f"https://localhost:8443/hps/dt/api/v1"
    client = Client()   # Create a client object
    client.binary_config.update(verbosity=3, debug=True, insecure=True, token=token, data_transfer_url=dt_url, log=True)
    client.start()

    api = DataTransferApi(client)
    api.status(wait=True)


For comprehensive usage information, see `Examples`_.

Documentation and issues
^^^^^^^^^^^^^^^^^^^^^^^^
Documentation for the latest stable release of PyHPS Data Transfer is hosted at `PyHPS Data Transfer documentation`_.

In the upper right corner of the documentation's title bar, there is an option for switching from
viewing the documentation for the latest stable release to viewing the documentation for the
development version or previously released versions.

On the `PyHPS Data Transfer Issues <https://github.com/ansys/pyhps-data-transfer/issues>`_ page,
you can create issues to report bugs and request new features. On the `PyHPS Data Transfer Discussions
<https://github.com/ansys/pyhps-data-transfer/projects>`_ page or the `Discussions <https://discuss.ansys.com/>`_
page on the Ansys Developer portal, you can post questions, share ideas, and get community feedback.

To reach the project support team, email `pyansys.core@ansys.com <mailto:pyansys.core@ansys.com>`_.


.. LINKS AND REFERENCES
.. _Getting Started: https://data-transfer.hps.docs.pyansys.com/version/stable/getting_started/index.html
.. _Examples: https://data-transfer.hps.docs.pyansys.com/version/stable/examples/index.html
.. _PyHPS Data Transfer documentation: https://data-transfer.hps.docs.pyansys.com/

