Metadata-Version: 2.1
Name: bchydro
Version: 0.6
Summary: BCHydro API
Home-page: https://github.com/emcniece/bchydro
Author: Eric McNiece
Author-email: emcniece@gmail.com
License: MIT
Download-URL: https://github.com/emcniece/bchydro/releases/latest/download/package.tar.gz
Keywords: bchydro
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Description-Content-Type: text/markdown
Requires-Dist: beautifulsoup4
Requires-Dist: p2
Requires-Dist: p3

# BCHydro API

![PyPi publish](https://github.com/emcniece/bchydro/workflows/Publish%20PyPi/badge.svg)

BCHydro Python API for extracting electricity usage statistics from your personal account.

## Installation

Via [PyPi](https://pypi.org/project/bchydro/):

```sh
pip install bchydro
```

Via Github:

```sh
git clone https://github.com/emcniece/bchydro.git
cd bchydro
pip install -r requirements.txt
```

## Usage

Running the example script:

```sh
pip install bchydro

export BCH_USER=your.email@domain.com
export BCH_PASS=your-bch-password

python test.py
```

Using in a project:

```py
import asyncio
from bchydro import BCHydroApi

async def main():
    a = BCHydroApi()
    await a.authenticate("username", "password")

    usage = await a.get_daily_usage()
    print(usage.electricity)
    print(a.get_latest_point())
    print(a.get_latest_usage())
    print(a.get_latest_cost())

asyncio.run(main())
```


## Todo

- [ ] Tests
- [ ] Publish on release, not tag


