Catalog PyPI
Back to packageRELEASE DETAILS

0.0.21

PyPI

aguasgaia

Python library to retrieve information from "Aguas de Gaia" portal

aguasgaiaapi
Published24 Aug 2024
Direct dependencies2
Transitive dependenciesNot calculated

README

Version 0.0.21 documentation

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/

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 2

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
aiohttp
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3",
  "evaluation": "NOT_EVALUATED"
}
aiohttpruntime
python-dateutil
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3",
  "evaluation": "NOT_EVALUATED"
}
python-dateutilruntime

Distribution files

2 collected
aguasgaia-0.0.21-py3-none-any.whl

bdist_wheel · 8.56 KB · Python py3

Source file
aguasgaia-0.0.21.tar.gz

sdist · 6.55 KB · Python source

Source file

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:31 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:ddce3d1d06fbb3ca224ff2be877ebca1f74c355e8b09b96fdd78427fb103d2d0

Other collected versions

View all collected versions →