Python wrapper for Veolia API
Project description
Python wrapper for using Veolia API : https://www.eau.veolia.fr/
Installation
pip install veolia-api
Usage
"""Example of usage of the Veolia API"""
import asyncio
import logging
from veolia_api.veolia_api import VeoliaAPI
logging.basicConfig(level=logging.DEBUG)
async def main() -> None:
"""Main function."""
# Create an instance of the VeoliaAPI class
api = VeoliaAPI("username", "password")
try:
# Fetch data for November 2024
await api.fetch_all_data(2024, 11)
# Display fetched data
print(api.account_data.daily_consumption)
print(api.account_data.monthly_consumption)
print(api.account_data.alert_settings.daily_enabled)
except Exception as e:
logging.error("An error occurred: %s", e)
finally:
await api.close()
if __name__ == "__main__":
asyncio.run(main())
Credits
This repository is inspired by the work done by @CorentinGrard. Thanks to him for his work.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
veolia_api-1.2.4.tar.gz
(10.2 kB
view details)
Built Distribution
File details
Details for the file veolia_api-1.2.4.tar.gz
.
File metadata
- Download URL: veolia_api-1.2.4.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a7897dce63b5257d8ab50c5144817bc92524090a45d6a451655c0b08961dee9 |
|
MD5 | 8232cf8bb534ed8c2f4f6521c5b23190 |
|
BLAKE2b-256 | 40df2061e79d710eaa5fca85c97dd6c52eab75bf6b081eccf032e19c9c8ba6ca |
File details
Details for the file veolia_api-1.2.4-py3-none-any.whl
.
File metadata
- Download URL: veolia_api-1.2.4-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0e5498689fc5a9e94c10bfb7ca76cff4bcd59abbc7e0459e843759578323e97 |
|
MD5 | 61b3dba5e79e0cdaeb4a62fe6b53e61e |
|
BLAKE2b-256 | 41b4c7ba5b227a6f64638d3b0086d806b59ae9548fb4d00ab1d31cccbc59beff |