Skip to main content

united-utilities-py

Async Python client for the United Utilities "Your Water" mobile API, reverse-engineered from the app (build 102). Pairs with a Home Assistant integration (united-utilities-hass).

Unofficial. Uses a private app API that United Utilities can change or withdraw at any time. For personal use with your own account.

Why the mobile API (not the website)

The myaccount.unitedutilities.com website is gated behind Google reCAPTCHA Enterprise and Jscrambler, so a scripted login needs a real browser. The mobile app talks to a separate gateway (prd-mobile-apigateway.unitedutilities.com) with a far simpler scheme: a static app apiKey header plus a customerId + numeric PIN login that returns a session token. No captcha.

Credentials

The mobile API does not use your website email/password. It needs:

  • customerId — a numeric id assigned when you register in the app.
  • pin — the numeric PIN you set in the app.
  • accountNumber — your water account number (for account-scoped calls).

The easiest way to find customerId is to capture the app's api/account/login request once; the body is customerId=…&pin=…&platform=… (form-encoded). The app pins its TLS certificate, so an intercepting proxy breaks the app's data calls even though the login call goes through — that's expected.

⚠️ Login has a 3-strike lockout. A wrong PIN decrements attemptsRemaining; at zero the account locks. This client never retries login(). Do not loop on AuthError.

Install

pip install united-utilities

Usage

import asyncio
from united_utilities import UnitedUtilitiesClient


async def main() -> None:
    async with UnitedUtilitiesClient("24000000", "000000", "4000000000") as uu:
        await uu.login()
        details = await uu.account_details()
        meter = await uu.meter_readings()
        print("balance:", details.account_balance)
        if meter.latest:
            print("last read:", meter.latest.value, "on", meter.latest.date)


asyncio.run(main())

In Home Assistant, pass the shared session:

from homeassistant.helpers.aiohttp_client import async_get_clientsession

client = UnitedUtilitiesClient(customer_id, pin, account_number,
                               session=async_get_clientsession(hass))

Endpoints covered

Method Returns
login() / logout() session token lifecycle
account_details() balance, next payment, meter flag, payment plan, bill count
meter_readings() meter details + reading history (.latest)
statement() itemised bills & payments
payment_info() current balance, minimum payment
preferences() notification preferences
notifications() customer notifications

Development

See CONTRIBUTING.md. Response shapes were confirmed against live production responses; tests run on synthetic fixtures (no real account data) with aresponses.

License

MIT

Metadata

Release files for united-utilities 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for united-utilities 0.2.0
File Size Uploaded Provenance Actions
united_utilities-0.2.0.tar.gz 12.7 kB With provenance Details for united_utilities-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for united-utilities 0.2.0
File Interpreter ABI Platform Actions
united_utilities-0.2.0-py3-none-any.whl Python 3 none any Details for united_utilities-0.2.0-py3-none-any.whl

Total release size: 23.2 kB

Release files / united_utilities-0.2.0.tar.gz

Download URL united_utilities-0.2.0.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4a88fff29ff2053de83eb70370ac9e5e8fd53dae22f9459fe973910750589810
BLAKE2b-256 checksum
How to use checksums
cb8c6668ecd941ff03e73dca09fe5793ce52f12ac778812e86523d3e9a5db4f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / united_utilities-0.2.0-py3-none-any.whl

Download URL united_utilities-0.2.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6df99769ad4c845ae54116a91f1e91ad7dd7ff47f4b3e5ec479b860868715c62
BLAKE2b-256 checksum
How to use checksums
0342db9a37d52dea96c9dfdb6792cee201b9a963f9bdc0c937d2115024b22e72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for united-utilities 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for united_utilities-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page