ute-wrapper


Nameute-wrapper JSON
Version 2.5.1 PyPI version JSON
download
home_pagehttps://gitlab.com/rogs/ute/
Summary[DEPRECATED] A wrapper to interact with UTE's API
upload_time2024-04-18 22:19:55
maintainerNone
docs_urlNone
authorRoger Gonzalez
requires_python>=3.9
licenseGPL-3.0-or-later
keywords api wrapper ute uruguay
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # UTE API Wrapper 🇺🇾

# THIS API NO LONGER WORKS

UTE deprecated the API that this wrapper uses on April 15th 2024. More information [here](https://github.com/rogsme/ute_homeassistant_integration/issues/3#issuecomment-2054332575).

I'll archive this repository in a few days.

<p align="center">
    <img src="https://gitlab.com/uploads/-/system/project/avatar/48558040/icon.png" alt="ute-wrapper"/>
</p>

[![codecov](https://codecov.io/gl/rogs/ute/graph/badge.svg?token=D1B2J3EB6K)](https://codecov.io/gl/rogs/ute)
[![PyPI version](https://badge.fury.io/py/ute-wrapper.svg)](https://badge.fury.io/py/ute-wrapper)

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
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

```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 a 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.*

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/rogs/ute/",
    "name": "ute-wrapper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "API, wrapper, UTE, Uruguay",
    "author": "Roger Gonzalez",
    "author_email": "roger@rogs.me",
    "download_url": "https://files.pythonhosted.org/packages/46/0f/1b7368c4039982aa86ce0f21ec95aa0adf144119c24a1ab54d0db51aa675/ute_wrapper-2.5.1.tar.gz",
    "platform": null,
    "description": "# UTE API Wrapper \ud83c\uddfa\ud83c\uddfe\n\n# THIS API NO LONGER WORKS\n\nUTE deprecated the API that this wrapper uses on April 15th 2024. More information [here](https://github.com/rogsme/ute_homeassistant_integration/issues/3#issuecomment-2054332575).\n\nI'll archive this repository in a few days.\n\n<p align=\"center\">\n    <img src=\"https://gitlab.com/uploads/-/system/project/avatar/48558040/icon.png\" alt=\"ute-wrapper\"/>\n</p>\n\n[![codecov](https://codecov.io/gl/rogs/ute/graph/badge.svg?token=D1B2J3EB6K)](https://codecov.io/gl/rogs/ute)\n[![PyPI version](https://badge.fury.io/py/ute-wrapper.svg)](https://badge.fury.io/py/ute-wrapper)\n\nThis Python package provides a convenient wrapper for interacting with the [UTE (Administraci\u00f3n Nacional de Usinas y Trasmisiones El\u00e9ctricas)](https://portal.ute.com.uy/) API in Uruguay \ud83c\uddfa\ud83c\uddfe. It allows you to retrieve various information related to your UTE account, electricity consumption, network status, and more.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Examples](#examples)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\nYou can install the UTE API Wrapper using pip:\n\n```bash\npip install ute-wrapper\n```\n\n## Usage\n\nImport the `UTEClient` class from the package and create an instance with your UTE account details:\n\n```python\nfrom ute_wrapper.ute import UTEClient\n\nemail = \"your_email@example.com\"\nphone_number = \"your_phone_number\"\ndevice_id = \"your_device_id\"  # Optional\naverage_cost_per_kwh = 4.0  # Optional, your average cost per kWh in UYU\npower_factor = 0.9 # Optional, your power factor. It's almost always close to 1\n\nute_client = UTEClient(email, phone_number, device_id, average_cost_per_kwh, power_factor)\n```\n\n### Available Methods\n\n- `get_devices_list()`: Get a list of UTE devices associated with the account.\n- `get_account()`: Get UTE account information for the specified device ID.\n- `get_peak()`: Get UTE peak information for the specified device ID.\n- `get_network_status()`: Get UTE network status information.\n- `get_renewable_sources()`: Get the percentage of UTE renewable sources.\n- `get_historic_consumption(date_start=None, date_end=None)`: Get historic UTE consumption information within a specified date range.\n- `get_current_usage_info()`: Get current usage information for the specified device ID.\n- `get_average_price(plan)`: Get the average price for a specific UTE plan (\"triple\" or \"doble\").\n\n\n## Examples\n\n### Get Historic Consumption\n\n```python\nhistoric_consumption = ute_client.get_historic_consumption(date_start=\"2023-08-01\", date_end=\"2023-08-15\")\nprint(historic_consumption)\n```\n\n### Get Current Usage Info\n\n```python\ncurrent_usage_info = ute_client.get_current_usage_info()\nprint(current_usage_info)\n```\n\n## Contributing\n\nContributions are welcome! If you find a bug or have a suggestion, please create an issue or submit a Merge Request on [Gitlab](https://gitlab.com/rogs/ute).\n\n## License\n\nThis project is licensed under the GNU General Public License, version 3.0. For more details, see [LICENSE](LICENSE).\n\n---\n\n*This project is not affiliated with UTE (Administraci\u00f3n Nacional de Usinas y Trasmisiones El\u00e9ctricas) or its affiliates.*\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "[DEPRECATED] A wrapper to interact with UTE's API",
    "version": "2.5.1",
    "project_urls": {
        "Documentation": "https://gitlab.com/rogs/ute/-/blob/master/README.md",
        "Homepage": "https://gitlab.com/rogs/ute/",
        "Repository": "https://gitlab.com/rogs/ute/"
    },
    "split_keywords": [
        "api",
        " wrapper",
        " ute",
        " uruguay"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "42904f7bf72ae548b7395d8afc29f5f4cd5ac61ca16dd6852fde05eb02c1236b",
                "md5": "98c1908466161605a73ec630a63554a1",
                "sha256": "46e76f17319e68806d6c26f465f2144002e7b43f47d18189d0fc58b1c53d1791"
            },
            "downloads": -1,
            "filename": "ute_wrapper-2.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "98c1908466161605a73ec630a63554a1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 19414,
            "upload_time": "2024-04-18T22:19:53",
            "upload_time_iso_8601": "2024-04-18T22:19:53.410866Z",
            "url": "https://files.pythonhosted.org/packages/42/90/4f7bf72ae548b7395d8afc29f5f4cd5ac61ca16dd6852fde05eb02c1236b/ute_wrapper-2.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "460f1b7368c4039982aa86ce0f21ec95aa0adf144119c24a1ab54d0db51aa675",
                "md5": "46241c5718af7087d6d2c027885e3156",
                "sha256": "39377d13b681eb9acd9ee13c203cbcd7e6e514870860a2faa477e091c5dcb99c"
            },
            "downloads": -1,
            "filename": "ute_wrapper-2.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "46241c5718af7087d6d2c027885e3156",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 19279,
            "upload_time": "2024-04-18T22:19:55",
            "upload_time_iso_8601": "2024-04-18T22:19:55.120965Z",
            "url": "https://files.pythonhosted.org/packages/46/0f/1b7368c4039982aa86ce0f21ec95aa0adf144119c24a1ab54d0db51aa675/ute_wrapper-2.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-18 22:19:55",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "rogs",
    "gitlab_project": "ute",
    "lcname": "ute-wrapper"
}
        
Elapsed time: 0.31133s