Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jezza34000/veolia-api
Veolia API client
https://github.com/jezza34000/veolia-api
api-client veolia
Last synced: 18 days ago
JSON representation
Veolia API client
- Host: GitHub
- URL: https://github.com/jezza34000/veolia-api
- Owner: Jezza34000
- License: mit
- Created: 2024-11-15T08:20:13.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-11-15T21:23:37.000Z (about 1 month ago)
- Last Synced: 2024-11-15T21:27:32.059Z (about 1 month ago)
- Topics: api-client, veolia
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Python wrapper for using Veolia API : https://www.eau.veolia.fr/
## Installation
```bash
pip install veolia-api
```## Usage
```python
"""Example of usage of the Veolia API"""import asyncio
import loggingfrom 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.