<p align=center>
<img src="https://upload.wikimedia.org/wikipedia/fi/thumb/2/2a/Veolia-logo.svg/250px-Veolia-logo.svg.png"/>
</p>
<p>
<a href="https://pypi.org/project/veolia-api/"><img src="https://img.shields.io/pypi/v/veolia-api.svg"/></a>
<a href="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white"><img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white" /></a>
<a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" /></a>
<a href="https://github.com/Jezza34000/veolia-api/actions"><img src="https://github.com/Jezza34000/veolia-api/workflows/CI/badge.svg"/></a>
</p>
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 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.
Raw data
{
"_id": null,
"home_page": "https://github.com/Jezza34000/veolia-api",
"name": "veolia_api",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": null,
"author": "Jezza34000",
"author_email": "info@mail.com",
"download_url": "https://files.pythonhosted.org/packages/40/df/2061e79d710eaa5fca85c97dd6c52eab75bf6b081eccf032e19c9c8ba6ca/veolia_api-1.2.4.tar.gz",
"platform": null,
"description": "<p align=center>\n <img src=\"https://upload.wikimedia.org/wikipedia/fi/thumb/2/2a/Veolia-logo.svg/250px-Veolia-logo.svg.png\"/>\n</p>\n\n<p>\n <a href=\"https://pypi.org/project/veolia-api/\"><img src=\"https://img.shields.io/pypi/v/veolia-api.svg\"/></a>\n <a href=\"https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white\"><img src=\"https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white\" /></a>\n <a href=\"https://github.com/psf/black\"><img src=\"https://img.shields.io/badge/code%20style-black-000000.svg\" /></a>\n <a href=\"https://github.com/Jezza34000/veolia-api/actions\"><img src=\"https://github.com/Jezza34000/veolia-api/workflows/CI/badge.svg\"/></a>\n</p>\n\nPython wrapper for using Veolia API : https://www.eau.veolia.fr/\n\n## Installation\n\n```bash\npip install veolia-api\n```\n\n## Usage\n\n```python\n\"\"\"Example of usage of the Veolia API\"\"\"\n\nimport asyncio\nimport logging\n\nfrom veolia_api.veolia_api import VeoliaAPI\n\nlogging.basicConfig(level=logging.DEBUG)\n\n\nasync def main() -> None:\n \"\"\"Main function.\"\"\"\n # Create an instance of the VeoliaAPI class\n api = VeoliaAPI(\"username\", \"password\")\n\n try:\n # Fetch data for November 2024\n await api.fetch_all_data(2024, 11)\n\n # Display fetched data\n print(api.account_data.daily_consumption)\n print(api.account_data.monthly_consumption)\n print(api.account_data.alert_settings.daily_enabled)\n\n except Exception as e:\n logging.error(\"An error occurred: %s\", e)\n finally:\n await api.close()\n\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n\n```\n\n## Credits\n\nThis repository is inspired by the work done by @CorentinGrard. Thanks to him for his work.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python wrapper for Veolia API",
"version": "1.2.4",
"project_urls": {
"Homepage": "https://github.com/Jezza34000/veolia-api"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "41b4c7ba5b227a6f64638d3b0086d806b59ae9548fb4d00ab1d31cccbc59beff",
"md5": "61b3dba5e79e0cdaeb4a62fe6b53e61e",
"sha256": "c0e5498689fc5a9e94c10bfb7ca76cff4bcd59abbc7e0459e843759578323e97"
},
"downloads": -1,
"filename": "veolia_api-1.2.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "61b3dba5e79e0cdaeb4a62fe6b53e61e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 9592,
"upload_time": "2024-11-21T05:55:23",
"upload_time_iso_8601": "2024-11-21T05:55:23.890352Z",
"url": "https://files.pythonhosted.org/packages/41/b4/c7ba5b227a6f64638d3b0086d806b59ae9548fb4d00ab1d31cccbc59beff/veolia_api-1.2.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "40df2061e79d710eaa5fca85c97dd6c52eab75bf6b081eccf032e19c9c8ba6ca",
"md5": "8232cf8bb534ed8c2f4f6521c5b23190",
"sha256": "3a7897dce63b5257d8ab50c5144817bc92524090a45d6a451655c0b08961dee9"
},
"downloads": -1,
"filename": "veolia_api-1.2.4.tar.gz",
"has_sig": false,
"md5_digest": "8232cf8bb534ed8c2f4f6521c5b23190",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 10228,
"upload_time": "2024-11-21T05:55:25",
"upload_time_iso_8601": "2024-11-21T05:55:25.335899Z",
"url": "https://files.pythonhosted.org/packages/40/df/2061e79d710eaa5fca85c97dd6c52eab75bf6b081eccf032e19c9c8ba6ca/veolia_api-1.2.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-21 05:55:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Jezza34000",
"github_project": "veolia-api",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "veolia_api"
}