Skip to main content

Python client for L'eau d'Ile-de-France (SEDIF) water consumption data

Project description

pyeauidf

Python client for L'eau d'Île-de-France (SEDIF) water consumption data.

Fetches daily, weekly, or monthly water consumption history directly via the Salesforce Aura API — no browser or Selenium required.

Disclaimer

This integration relies on scraping the SEDIF customer portal. It is not based on an official API, so any change to the website's structure or authentication flow may break it without notice.

This integration was built with the help of Claude (Anthropic).

Home Assistant

A ready-to-use Home Assistant integration built on top of this library is available: ha_eauidf.

Installation

pip install .

Requires Python 3.10+ and aiohttp.

Usage

CLI

# Last 7 days (default)
pyeauidf -u email@example.com -p password

# Custom number of days
pyeauidf -u email@example.com -p password --days 30

# Weekly aggregation
pyeauidf -u email@example.com -p password --days 90 --step weekly

# Credentials via environment variables
export EAUIDF_USERNAME=email@example.com
export EAUIDF_PASSWORD=password
pyeauidf

Python

import asyncio
from pyeauidf import EauIDFClient
from pyeauidf.client import TimeStep
from datetime import date

async def main():
    async with EauIDFClient("email@example.com", "password") as client:
        await client.login()

        # Daily consumption (last 90 days by default)
        result = await client.get_daily_consumption()
        for r in result.records:
            cost = result.daily_cost(r)
            print(f"{r.date:%Y-%m-%d}: {r.consumption_liters:.0f}L — {cost:.2f}€")

        # Total cost
        print(f"Total: {result.total_cost:.2f}€ ({result.price_per_m3:.4f} €/m³)")

        # Weekly or monthly
        result = await client.get_daily_consumption(time_step=TimeStep.WEEKLY)

        # Custom date range
        result = await client.get_daily_consumption(
            start_date=date(2026, 1, 1),
            end_date=date(2026, 3, 1),
        )

asyncio.run(main())

Data model

get_daily_consumption() returns a ConsumptionData object:

Field Type Description
records list[ConsumptionRecord] Individual consumption measurements
price_per_m3 float Average water price (€/m³)
daily_cost(record) float Cost in euros for a single record
total_cost float Total cost in euros for all records

Each ConsumptionRecord contains:

Field Type Description
date datetime Timestamp of the reading
consumption_liters float Water consumed (liters)
meter_reading float Cumulative meter reading (m³)
is_estimated bool Whether the value is estimated

How it works

The library authenticates against the Salesforce Experience Cloud portal that powers L'eau d'Île-de-France, then calls the same Aura API endpoints that the website uses:

  1. Login via LightningLoginFormController
  2. Follow frontdoor.jsp to establish session cookies
  3. Call Apex actions (LTN015_ICL_ContratConsoHisto.getData) for consumption data

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

pyeauidf-1.2.0.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyeauidf-1.2.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file pyeauidf-1.2.0.tar.gz.

File metadata

  • Download URL: pyeauidf-1.2.0.tar.gz
  • Upload date:
  • Size: 20.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pyeauidf-1.2.0.tar.gz
Algorithm Hash digest
SHA256 ffa9f346c41962f9e6174b6f02c7a98a455876f93b377b7f04efba4c89372435
MD5 e41f217d53a45e8ad3642d25703f03b4
BLAKE2b-256 26f00cfd38e1406f2a115b571341c813084de1a8ae881afa72b6b114ce4af007

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyeauidf-1.2.0.tar.gz:

Publisher: publish.yml on TimoPtr/pyeauidf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyeauidf-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyeauidf-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pyeauidf-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f88df59b4146e5170e601ecd7eb63cd5c4bba49b3362abec8bc6b4b2d5c550c
MD5 4aabae6f7b5a2668c81043ad8c699755
BLAKE2b-256 a9e0b4bd4e7ee7be6f482feefbbddcf05eefe1f9085ed0535139e2afbbcfc1f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyeauidf-1.2.0-py3-none-any.whl:

Publisher: publish.yml on TimoPtr/pyeauidf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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