Skip to main content

Aguas de Gaia API

Installation

$ pip install aguasgaia

Usage

import asyncio
import aiohttp
from aguasgaia import AguasGaia


async def main():
    session = aiohttp.ClientSession()

    aguas = AguasGaia(session, "<USERNAME>", "<PASSWORD>")
    print("LOGIN: ", await aguas.login())

    print("SUBSCRIPTIONS:\n{0}".format(await aguas.get_subscriptions()))

    inv = await aguas.get_last_invoice()
    print("INVOICE: {0}\n{1}".format(inv.invoice_value, inv.invoice_attributes))

    consumption = await aguas.get_last_consumption()
    print("CONSUMPTION: {0}\n{1}".format(consumption.consumption_value, consumption.consumption_attributes))

    await session.close()

if __name__ == "__main__":
    asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
    asyncio.run(main())

Tests

Make sure pytest asyncio is installed

$ pip install pytest-asyncio

Execute the tests

$ pytest tests/

Metadata

Release files for aguasgaia 0.0.21

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

Source distribution (sdist)

Source distribution for aguasgaia 0.0.21
File Size Uploaded Provenance
aguasgaia-0.0.21.tar.gz 6.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aguasgaia 0.0.21
File Interpreter ABI Platform
aguasgaia-0.0.21-py3-none-any.whl Python 3 none any Details

Total release size: 15.5 kB

Release files / aguasgaia-0.0.21.tar.gz

Download URL aguasgaia-0.0.21.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5aef82004b0b94eebf5ee0663848b8f60c6600d4ce0c150db4cbdbcfa35fb434
BLAKE2b-256 checksum
How to use checksums
7388458b39a29c32870e4962a541b5b0a6b21921e9edb1542a777139d0d0ca95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Release files / aguasgaia-0.0.21-py3-none-any.whl

Download URL aguasgaia-0.0.21-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3ca093edfd3a92cb5c26aef90c1b9711dfd89496022f25ad934b25d73bcbd35
BLAKE2b-256 checksum
How to use checksums
896751d44f78cdc3b65992be1c73cc47033fabe16b9249a872b9c4ae61d2753e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.19

Security for aguasgaia 0.0.21

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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