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

Uploaded Source

Built Distribution

veolia_api-1.2.3-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: veolia_api-1.2.3.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

Hashes for veolia_api-1.2.3.tar.gz
Algorithm Hash digest
SHA256 a003c073bc0eee52ad30087d6370da936654f86834edb53eb3a13e62388f70ab
MD5 a810b29cff1c3c6391267628dc77db73
BLAKE2b-256 bf837272a4b161821d4bb41916f16df2917a5bdf49f41e626df6164eca9f51a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: veolia_api-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 9.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b16337e13871838dc22a6cfb09f3586b03548ff1c47dfe4da2965f9f137407e7
MD5 02b44bccafc6ce386425411bbe597c98
BLAKE2b-256 fe034bed69ea1209c1fb931c20c716dc56f44f571d9a75096f3be9aff4954634

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