Metadata-Version: 2.3
Name: py-etp-client
Version: 1.0.5
Summary: A python client to interact with the ETP server in with a websocket connection
License: Apache-2.0
Author: Valentin Gauthier
Author-email: valentin.gauthier@geosiris.com
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: dotenv (>=0.9.9,<0.10.0)
Requires-Dist: energyml-prodml2-2 (>=1.12.0,<2.0.0)
Requires-Dist: energyml-resqml2-0-1 (>=1.12.0,<2.0.0)
Requires-Dist: energyml-resqml2-2 (>=1.12.0,<2.0.0)
Requires-Dist: energyml-utils (>=1.8.3,<2.0.0)
Requires-Dist: energyml-witsml2-0 (>=1.12.0,<2.0.0)
Requires-Dist: energyml-witsml2-1 (>=1.12.0,<2.0.0)
Requires-Dist: etpproto (>=1.0.7,<2.0.0)
Requires-Dist: numpy (>=1.26.0,<2.0.0)
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
Requires-Dist: websocket-client (>=1.0.0,<2.0.0)
Description-Content-Type: text/markdown

<!--
Copyright (c) 2022-2023 Geosiris.
SPDX-License-Identifier: Apache-2.0
-->

# py-etp-client

[![License](https://img.shields.io/pypi/l/py-etp-client)](https://github.com/geosiris-technologies/py-etp-client/blob/main/LICENSE)
[![Documentation Status](https://readthedocs.org/projects/py-etp-client/badge/?version=latest)](https://py-etp-client.readthedocs.io/en/latest/?badge=latest)
[![Python CI](https://github.com/geosiris-technologies/py-etp-client/actions/workflows/ci-tests.yml/badge.svg)](https://github.com/geosiris-technologies/py-etp-client/actions/workflows/ci-tests.yml)
[![Python version](https://img.shields.io/pypi/pyversions/py-etp-client)](https://pypi.org/project/py-etp-client/)
[![PyPI Version](https://img.shields.io/pypi/v/py-etp-client)](https://badge.fury.io/py/py-etp-client)
[![Status](https://img.shields.io/pypi/status/py-etp-client)](https://pypi.org/project/py-etp-client/)
[![Codecov](https://codecov.io/gh/geosiris-technologies/py-etp-client/branch/main/graph/badge.svg)](https://codecov.io/gh/geosiris-technologies/py-etp-client)


An etp client python module to make an etp websocket connexion


## Example of use : 

Check "example" folder for a example project that uses this library.

To test the example : 
Create an .env file in the example folder with the following content : 

```env
INI_FILE_PATH=../configs/sample.yml 
```

Then create the corresponding yaml file : 
```yaml
# sample.yml
PORT: 443
URL: wss://....
USERNAME: username
PASSWORD: pwd
ADDITIONAL_HEADERS:
  - data-partition-id: osdu
TOKEN: ACCESS_TOKEN
TOKEN_URL: https://.../token
TOKEN_GRANT_TYPE: ...
TOKEN_SCOPE: ...
TOKEN_REFRESH_TOKEN: ...
```

Finally run the client script : 
```bash
poetry install
poetry run client
```


## installation :

Pip:
```bash
pip install py-etp-client
```

Poetry
```bash
poetry add py-etp-client
```

## Usage : 


Check [example](https://github.com/geosiris-technologies/py-etp-client/tree/main/example/py_etp_client_example/main.py) for more information

