summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Gonzalez <roger@rogs.me>2023-08-17 15:36:58 -0300
committerRoger Gonzalez <roger@rogs.me>2023-08-17 15:36:58 -0300
commitac583ab4072256f5cc96a17931bcc553adf89aed (patch)
treed57115b071bf7f97ae91890e27093423e4c55c49
parent286de139b7004c77185b66f1d74b17f92cb1343c (diff)
Added README
-rw-r--r--README.md74
-rwxr-xr-xpyproject.toml2
-rwxr-xr-xsrc/ute_wrapper/ute.py2
3 files changed, 74 insertions, 4 deletions
diff --git a/README.md b/README.md
index 7da581f..9631ca5 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,73 @@
-# UTE API Wrapper
+# UTE API Wrapper 🇺🇾
-This is a sample text
+This Python package provides a convenient wrapper for interacting with the [UTE (Administración Nacional de Usinas y Trasmisiones Eléctricas)](https://portal.ute.com.uy/) 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](#installation)
+- [Usage](#usage)
+- [Examples](#examples)
+- [Contributing](#contributing)
+- [License](#license)
+
+## Installation
+
+You can install the UTE API Wrapper using pip:
+
+```bash
+pip install ute-wrapper
+```
+
+## Usage
+
+Import the `UTEClient` class from the package and create an instance with your UTE account details:
+
+```python
+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
+
+ute_client = UTEClient(email, phone_number, device_id, average_cost_per_kwh)
+```
+
+### 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
+
+```python
+historic_consumption = ute_client.get_historic_consumption(date_start="2023-08-01", date_end="2023-08-15")
+print(historic_consumption)
+```
+
+### Get Current Usage Info
+
+```python
+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 Merge Request on [Gitlab](https://gitlab.com/rogs/ute).
+
+## License
+
+This project is licensed under the GNU General Public License, version 3.0. For more details, see [LICENSE](LICENSE).
+
+---
+
+*This project is not affiliated with UTE (Administración Nacional de Usinas y Trasmisiones Eléctricas) or its affiliates.*
diff --git a/pyproject.toml b/pyproject.toml
index 32e0b2b..a97987d 100755
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -45,7 +45,7 @@ build-backend = "hatchling.build"
[project]
name = "ute_wrapper"
-version = "1.0.2"
+version = "1.0.3"
authors = [
{ name="Roger Gonzalez", email="roger@rogs.me" },
]
diff --git a/src/ute_wrapper/ute.py b/src/ute_wrapper/ute.py
index d41ec8a..f4897d9 100755
--- a/src/ute_wrapper/ute.py
+++ b/src/ute_wrapper/ute.py
@@ -1,5 +1,5 @@
"""
- UTE (Administración Nacional de Usinas y Trasmisiones Eléctricas) api wrapper
+ UTE (Administración Nacional de Usinas y Trasmisiones Eléctricas) API Wrapper
Copyright (C) 2023 Roger Gonzalez
This program is free software: you can redistribute it and/or modify