Async Python client for the Veolia water portal API (eau.veolia.fr).
First of all, you need to install devbox if you don't have a python environment
Once the previous step is done, simply run
devbox shell
cp .env.example .env # fill in your credentials
python usage_example.pyThat's it !
If you already have a python environment just run
pip install veolia-api"""Example of usage of the Veolia API"""
import asyncio
from datetime import date
import aiohttp
from veolia_api.veolia_api import VeoliaAPI
async def main() -> None:
"""Main function."""
async with aiohttp.ClientSession() as session:
client_api = VeoliaAPI("your@email.com", "password", session)
await client_api.fetch_all_data(date(2025, 1, 1), date(2025, 9, 1))
# Display fetched data
print(client_api.account_data.daily_consumption)
print(client_api.account_data.monthly_consumption)
print(client_api.account_data.alert_settings.daily_enabled)
if __name__ == "__main__":
asyncio.run(main())You can use usage_example.py
Contributions are welcome. Please read CONTRIBUTING.md for guidelines on reporting bugs, suggesting features, and submitting pull requests.
This repository is inspired by the work done by @CorentinGrard. Thanks to him for his work.