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())

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

Uploaded Source

Built Distribution

veolia_api-1.1.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: veolia_api-1.1.2.tar.gz
  • Upload date:
  • Size: 9.4 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.1.2.tar.gz
Algorithm Hash digest
SHA256 1e6b1d57e0cce77fe6e7fb8242db5faf727c349ac8609fb87d8ff904bdf34c15
MD5 32cb3a76c05784071d970e63d84471ec
BLAKE2b-256 27ffb34715cc59671507ac2a236aa8e5fd101f5e2036b0c229455f0319b65cd4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: veolia_api-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.8 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d208b08d4633dda048f68e87640c6a0ad2c215b89638ab70e6d4b00950168a6a
MD5 697bb2dd0863c6de765b14930f02458d
BLAKE2b-256 115cc767db4cfa519d5af8ef46a5968b9e619e6801461c84815c0b7bec43d94b

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