Async Python wrapper to interact with internal Veolia API
Project description
Small client to retrieve the water consumption from Veolia website: https://www.eau-services.com
Installation
pip install pyolia
Getting started
import asyncio
from pyolia.client import VeoliaClient
USERNAME = "your username"
PASSWORD = "your password"
async def main() -> None:
async with VeoliaClient(USERNAME, PASSWORD) as client:
print(await client.get_consumption(12, 2020))
asyncio.run(main())
Development
Installation
-
For Linux, install pyenv using pyenv-installer
-
For MacOS, run
brew install pyenv
-
Don't forget to update your
.bashrc
file (or similar):export PATH="~/.pyenv/bin:$PATH" eval "$(pyenv init -)"
-
Install the required dependencies
-
Install poetry:
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
-
Clone this repository
-
cd python-veolia-api
-
Install the required Python version:
pyenv install
-
Init the project:
poetry install
-
Run
poetry run pre-commit install
PyCharm
As IDE you can use PyCharm.
Using snap, run snap install pycharm --classic
to install it.
For MacOS, run brew cask install pycharm-ce
Once launched, don't create a new project, but open an existing one and select the python-veolia-api folder.
Go to File | Settings | Project: nre-tag | Project Interpreter. Your interpreter must look like <whatever>/python-veolia-api/.venv/bin/python
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.