Metadata-Version: 2.1
Name: drift-python-client
Version: 0.2.1
Summary: Drift Python Client
Home-page: https://github.com/panda-official/DriftPythonClient
Author: PANDA, GmbH
Author-email: info@panda.technology
License: UNKNOWN
Platform: UNKNOWN
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: influxdb-client (==1.30.0)
Requires-Dist: minio (==7.1.10)
Requires-Dist: drift-protocol (<1.0,>=0.2.0)
Requires-Dist: wavelet-buffer (<1.0,>=0.3.0)
Requires-Dist: paho-mqtt (==1.6.1)
Requires-Dist: numpy (==1.23.1)
Requires-Dist: deprecation (==2.1.0)
Provides-Extra: docs
Requires-Dist: mkdocs (~=1.3) ; extra == 'docs'
Requires-Dist: mkdocs-material (~=8.3) ; extra == 'docs'
Requires-Dist: plantuml-markdown (~=3.5) ; extra == 'docs'
Requires-Dist: mkdocs-same-dir (~=0.1) ; extra == 'docs'
Requires-Dist: mkdocstrings[python] (~=0.19) ; extra == 'docs'
Requires-Dist: mkdocs-jupyter (~=0.21) ; extra == 'docs'
Provides-Extra: format
Requires-Dist: black[jupyter] (==22.6.0) ; extra == 'format'
Provides-Extra: lint
Requires-Dist: pylint (==2.14.4) ; extra == 'lint'
Requires-Dist: pylint-protobuf (==0.20.2) ; extra == 'lint'
Provides-Extra: test
Requires-Dist: pytest (==7.1.2) ; extra == 'test'
Requires-Dist: pytest-mock (==3.8.2) ; extra == 'test'

# Drift Python Client

![GitHub Workflow Status](https://img.shields.io/github/workflow/status/panda-official/DriftPythonClient/ci)
![PyPI](https://img.shields.io/pypi/v/drift-python-client)
![PyPI - Downloads](https://img.shields.io/pypi/dm/drift-python-client)

Python Client to access data of [PANDA|Drift](docs/panda_drift.md)

## Description

Drift Python Client is a high level library to get current or historical data with minimal knowledge about **PANDA|Drift**
infrastructure.

## Features

* Access to live Drift data
* Access to history of input data
* Access to history of metrics
* Cross-platform

## Requirements

* Python >= 3.8

## Installing

```
pip install drift-python-client
```

If you need the latest version from GitHub:

```
pip install git+https://github.com/panda-official/DriftPythonClient.git
```

## Usage Example

```python
import os
from datetime import datetime

from drift_client import DriftClient

drift_client = DriftClient("10.0.0.153", os.getenv("DRIFT_PASSWORD"))
# Download list of history

packages = drift_client.get_package_names(
    "acc-5",
    datetime.strptime("2022-01-01 00:00:00", "%Y-%m-%d %H:%M:%S"),
    datetime.strptime("2022-01-02 00:00:00", "%Y-%m-%d %H:%M:%S")
)

print(packages)
for path in packages:
    data = drift_client.get_item(path).as_np(scale_factor=2)
    print(data)
```

## References:

* [Documentation](https://driftpythonclient.readthedocs.io/en/latest/)
* [DriftProtocol](https://github.com/panda-official/DriftProtocol)
* [WaveletBuffer](https://github.com/panda-official/WaveletBuffer)


