Skip to main content

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.2.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

veolia_api-1.2.2-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file veolia_api-1.2.2.tar.gz.

File metadata

  • Download URL: veolia_api-1.2.2.tar.gz
  • Upload date:
  • Size: 10.1 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

Hashes for veolia_api-1.2.2.tar.gz
Algorithm Hash digest
SHA256 e08b4eb254eace59b86c6f9f22876d03556086904cf031b73e69c30de869b9f1
MD5 b75a5810505a5fbd85c361a1cd1c01b0
BLAKE2b-256 bc75c5a16ff58afa50db50966b4c06f2d6abe11bd3a9600741f219ddf1bfc16a

See more details on using hashes here.

File details

Details for the file veolia_api-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: veolia_api-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 9.4 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

Hashes for veolia_api-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5658bb2f0ce9bd126fce34d83eac951a6dc126c3cbc49b4273bb4a1e7c662efc
MD5 dc8e0e3347c87db66ba109b1c985cf8d
BLAKE2b-256 e2d523f40f77e801f136db4853d7787405e2e8d48586d9db856e731ce5786a94

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page