Metadata-Version: 2.1
Name: nectarpy
Version: 0.8.0
Summary: A Python API module designed to run queries on Nectar
Home-page: https://github.com/NectarProtocol/python-nectar-module
Author: Tamarin Health
Author-email: phil@tamarin.health
License: Apache License 2.0
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8, <4
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE

# PYTHON NECTAR MODULE

This is a Python API module designed to run queries on Nectar, add bucket information, and set policies.

## Install

```bash
pip3 install nectarpy
```

## Example

```python
from nectarpy import Nectar

nectar = Nectar("API-SECRET")

result = nectar.query(
    aggregate_type="variance",
    aggregate_column="heart_rate",
    filters='[ { "column": "smoking", "filter": "=", "value": false } ]',
)

print(result) # 1234.5
```

## Integration Tests

### Step 1: Create a .env file

```
API_SECRET=0x123...
EVM_NODE=http://127.0.0.1:8545/
```

### Step 2: Run!

```bash
python3 tests.py
```


