Python client for unofficial Global Omnium water API
Project description
Aguasgo-py Python API
Programmatic access to water consumption data from Global Omnium, the Spanish water distributor management group.
🚀 Features
- Multi-entity Support: Compatible with various Global Omnium management companies (e.g., Emivasa, Aguas de Valencia, and others).
- Automatic Municipality → Base URL Detection: Enter your municipality during setup; the library resolves the correct API endpoint automatically.
- Modern Python: Fully updated for Python 3.11+ with strong type hinting and asynchronous support (
asyncio/aiohttp). - Consumption Data: Retrieve current readings and hourly/historical consumption.
- Historical Backfill: Fetch complete historical data in chunks (30-day windows) for Home Assistant Energy Dashboard integration.
- Reliable: Robust parsing and session management designed for stable Home Assistant integrations.
📦 Installation
For Development (Editable Mode)
If you are contributing or developing a component based on this library, install it in editable mode:
git clone https://github.com/carlos-48/aguasgo-py.git
cd aguasgo-py
pip install -e .
For Production
pip install aguasgo-py
🛠️ Quick Start
import asyncio
import aiohttp
from aguasgo import Client
async def main():
async with aiohttp.ClientSession() as session:
# base_url is mandatory as it depends on the management company of your municipality
client = Client(
session=session,
username="your_username",
password="your_password",
base_url="https://www.emivasa.es/VirtualOffice"
)
# Example: Get current measure
measure = await client.get_measure()
print(f"Current Reading: {measure.accumulate} m³")
print(f"Instant Consumption: {measure.instant} l/h")
asyncio.run(main())
🧪 Testing
The library includes a comprehensive test suite using pytest.
Unit Tests
Run fast, deterministic tests using local fixtures:
pytest tests/unit
Integration Tests
Run tests against the live Global Omnium API (requires credentials):
pytest --run-integration tests/integration
⚖️ License & Attribution
This project is licensed under the GNU General Public License v3.0 (GPLv3).
Attribution Notice: This library is based on the original work by ldotlopez, adapted, refactored, and updated by carlos-48 to migrate from electrical energy data (original project) to water supply data.
🔗 Useful Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aguasgo_py-2026.7.1.tar.gz.
File metadata
- Download URL: aguasgo_py-2026.7.1.tar.gz
- Upload date:
- Size: 83.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c89ef9878df26dc3e63b4639acdaf849e71d2a36c147317ae4ee95b8db07db53
|
|
| MD5 |
df65024153376eeb37797c903338e14a
|
|
| BLAKE2b-256 |
c0ca046352aa84542560a2bfc12a64a3eeb5b377b78b2460c98e44f1646f90a9
|
Provenance
The following attestation bundles were made for aguasgo_py-2026.7.1.tar.gz:
Publisher:
publish.yml on carlos-48/aguasgo-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aguasgo_py-2026.7.1.tar.gz -
Subject digest:
c89ef9878df26dc3e63b4639acdaf849e71d2a36c147317ae4ee95b8db07db53 - Sigstore transparency entry: 2068283346
- Sigstore integration time:
-
Permalink:
carlos-48/aguasgo-py@c125c4a5c95f08934c3394cbbe0a578bdafc54dc -
Branch / Tag:
refs/tags/v2026.7.1 - Owner: https://github.com/carlos-48
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c125c4a5c95f08934c3394cbbe0a578bdafc54dc -
Trigger Event:
push
-
Statement type:
File details
Details for the file aguasgo_py-2026.7.1-py3-none-any.whl.
File metadata
- Download URL: aguasgo_py-2026.7.1-py3-none-any.whl
- Upload date:
- Size: 85.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8f8a566fdfe5a5b13c9b60be932bf4808c6dc9ee949e3761490dbedcca89272
|
|
| MD5 |
26efe4debdd741469f9e1a0d5ce59fe4
|
|
| BLAKE2b-256 |
b15ea948c084e0b238fa9588af3e64c16107ecf6f3807aa72fd6c9507f630048
|
Provenance
The following attestation bundles were made for aguasgo_py-2026.7.1-py3-none-any.whl:
Publisher:
publish.yml on carlos-48/aguasgo-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aguasgo_py-2026.7.1-py3-none-any.whl -
Subject digest:
a8f8a566fdfe5a5b13c9b60be932bf4808c6dc9ee949e3761490dbedcca89272 - Sigstore transparency entry: 2068283569
- Sigstore integration time:
-
Permalink:
carlos-48/aguasgo-py@c125c4a5c95f08934c3394cbbe0a578bdafc54dc -
Branch / Tag:
refs/tags/v2026.7.1 - Owner: https://github.com/carlos-48
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c125c4a5c95f08934c3394cbbe0a578bdafc54dc -
Trigger Event:
push
-
Statement type: