Skip to main content

A wrapper to interact with UTE's API

Project description

UTE API Wrapper 🇺🇾

* [ ] ute-wrapper

codecov PyPI version

This Python package provides a convenient wrapper for interacting with the UTE (Administración Nacional de Usinas y Trasmisiones Eléctricas) API in Uruguay 🇺🇾. It allows you to retrieve various information related to your UTE account, electricity consumption, network status, and more.

Table of Contents

Installation

You can install the UTE API Wrapper using pip:

pip install ute-wrapper

Usage

Import the UTEClient class from the package and create an instance with your UTE account details:

from ute_wrapper.ute import UTEClient

email = "your_email@example.com"
phone_number = "your_phone_number"
device_id = "your_device_id"  # Optional
average_cost_per_kwh = 4.0  # Optional, your average cost per kWh in UYU
power_factor = 0.9 # Optional, your power factor. It's almost always close to 1

ute_client = UTEClient(email, phone_number, device_id, average_cost_per_kwh, power_factor)

Available Methods

  • get_devices_list(): Get a list of UTE devices associated with the account.
  • get_account(): Get UTE account information for the specified device ID.
  • get_peak(): Get UTE peak information for the specified device ID.
  • get_network_status(): Get UTE network status information.
  • get_renewable_sources(): Get the percentage of UTE renewable sources.
  • get_historic_consumption(date_start=None, date_end=None): Get historic UTE consumption information within a specified date range.
  • get_current_usage_info(): Get current usage information for the specified device ID.
  • get_average_price(plan): Get the average price for a specific UTE plan ("triple" or "doble").

Examples

Get Historic Consumption

historic_consumption = ute_client.get_historic_consumption(date_start="2023-08-01", date_end="2023-08-15")
print(historic_consumption)

Get Current Usage Info

current_usage_info = ute_client.get_current_usage_info()
print(current_usage_info)

Contributing

Contributions are welcome! If you find a bug or have a suggestion, please create an issue or submit a Merge Request on Gitlab.

License

This project is licensed under the GNU General Public License, version 3.0. For more details, see LICENSE.


This project is not affiliated with UTE (Administración Nacional de Usinas y Trasmisiones Eléctricas) or its affiliates.

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

ute_wrapper-2.3.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

ute_wrapper-2.3.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file ute_wrapper-2.3.0.tar.gz.

File metadata

  • Download URL: ute_wrapper-2.3.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Linux/5.4.109+

File hashes

Hashes for ute_wrapper-2.3.0.tar.gz
Algorithm Hash digest
SHA256 34bb400ab382d5be1a1b191023512399163142061bd28168edc4e69153a503d2
MD5 b9b03747c4970eeede6bbed1fefdca57
BLAKE2b-256 42b5562dd5a6c8d5bf9f7fef449dcba0f4e5357024a27f5793b0be8b173c9ded

See more details on using hashes here.

File details

Details for the file ute_wrapper-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: ute_wrapper-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.2 Linux/5.4.109+

File hashes

Hashes for ute_wrapper-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 346b5be995bbbd4f5d6e29dc0ba2c6901577e1fc60cbb78e7a0c60b9eb3a1260
MD5 a341939aa86bae460d05c5428592b19f
BLAKE2b-256 4ad544ceaa4081662e185150a459c321f9efdc384c266bdc79e25c754df5193c

See more details on using hashes here.

Supported by

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