[![PyPI Version][pypi-image]][pypi-url]
[![pre-commit.ci Status][pre-commit-ci-image]][pre-commit-ci-url]
[![Build Status][build-image]][build-url]
<!-- Badges -->
[pypi-image]: https://img.shields.io/pypi/v/aiopvpc
[pypi-url]: https://pypi.org/project/aiopvpc/
[pre-commit-ci-image]: https://results.pre-commit.ci/badge/github/azogue/aiopvpc/master.svg
[pre-commit-ci-url]: https://results.pre-commit.ci/latest/github/azogue/aiopvpc/master
[build-image]: https://github.com/azogue/aiopvpc/actions/workflows/main.yml/badge.svg
[build-url]: https://github.com/azogue/aiopvpc/actions/workflows/main.yml
# aiopvpc
Simple aio library to download Spanish electricity hourly prices.
Made to support the [**`pvpc_hourly_pricing`** HomeAssistant integration](https://www.home-assistant.io/integrations/pvpc_hourly_pricing/).
<span class="badge-buymeacoffee"><a href="https://www.buymeacoffee.com/azogue" title="Donate to this project using Buy Me A Coffee"><img src="https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg" alt="Buy Me A Coffee donate button" /></a></span>
## Install
Install with `pip install aiopvpc` or clone it to run tests or anything else.
## Usage
```python
import aiohttp
from datetime import datetime
from aiopvpc import PVPCData
async with aiohttp.ClientSession() as session:
pvpc_handler = PVPCData(session=session, tariff="2.0TD")
esios_data = await pvpc_handler.async_update_all(
current_data=None, now=datetime.utcnow()
)
print(esios_data.sensors["PVPC"])
```
Raw data
{
"_id": null,
"home_page": "https://github.com/azogue/aiopvpc",
"name": "aiopvpc",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Eugenio Panadero",
"author_email": "eugenio.panadero@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/09/c1/ebb7977ae8c1e9fcd7520a14fd1e82fc9fbe4c691c62cf114f57a1bd3439/aiopvpc-4.3.1.tar.gz",
"platform": null,
"description": "[![PyPI Version][pypi-image]][pypi-url]\n[![pre-commit.ci Status][pre-commit-ci-image]][pre-commit-ci-url]\n[![Build Status][build-image]][build-url]\n\n<!-- Badges -->\n\n[pypi-image]: https://img.shields.io/pypi/v/aiopvpc\n[pypi-url]: https://pypi.org/project/aiopvpc/\n[pre-commit-ci-image]: https://results.pre-commit.ci/badge/github/azogue/aiopvpc/master.svg\n[pre-commit-ci-url]: https://results.pre-commit.ci/latest/github/azogue/aiopvpc/master\n[build-image]: https://github.com/azogue/aiopvpc/actions/workflows/main.yml/badge.svg\n[build-url]: https://github.com/azogue/aiopvpc/actions/workflows/main.yml\n\n# aiopvpc\n\nSimple aio library to download Spanish electricity hourly prices.\n\nMade to support the [**`pvpc_hourly_pricing`** HomeAssistant integration](https://www.home-assistant.io/integrations/pvpc_hourly_pricing/).\n\n<span class=\"badge-buymeacoffee\"><a href=\"https://www.buymeacoffee.com/azogue\" title=\"Donate to this project using Buy Me A Coffee\"><img src=\"https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg\" alt=\"Buy Me A Coffee donate button\" /></a></span>\n\n## Install\n\nInstall with `pip install aiopvpc` or clone it to run tests or anything else.\n\n## Usage\n\n```python\nimport aiohttp\nfrom datetime import datetime\nfrom aiopvpc import PVPCData\n\nasync with aiohttp.ClientSession() as session:\n pvpc_handler = PVPCData(session=session, tariff=\"2.0TD\")\n esios_data = await pvpc_handler.async_update_all(\n current_data=None, now=datetime.utcnow()\n )\nprint(esios_data.sensors[\"PVPC\"])\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Retrieval of Spanish Electricity hourly prices (PVPC)",
"version": "4.3.1",
"project_urls": {
"Homepage": "https://github.com/azogue/aiopvpc",
"Repository": "https://github.com/azogue/aiopvpc"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4d1c7119801ae8a51ea44c17a8421d5f575732e7c248dc4d40dfcf08d46500a7",
"md5": "5ec73c149907b33ee0928d7370ae4f70",
"sha256": "65468e5b526c941ec381589d6594daf1b3af407ad36a74f5e64a0cd763529e87"
},
"downloads": -1,
"filename": "aiopvpc-4.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5ec73c149907b33ee0928d7370ae4f70",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 14927,
"upload_time": "2024-03-25T08:41:36",
"upload_time_iso_8601": "2024-03-25T08:41:36.035767Z",
"url": "https://files.pythonhosted.org/packages/4d/1c/7119801ae8a51ea44c17a8421d5f575732e7c248dc4d40dfcf08d46500a7/aiopvpc-4.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "09c1ebb7977ae8c1e9fcd7520a14fd1e82fc9fbe4c691c62cf114f57a1bd3439",
"md5": "0cc514cfcecf8d3aca4a8b5c12d352c4",
"sha256": "b6e8f4ad03ca8a3fb2cf77e00f26549185ea9e87b491d573c1f44d603d63d1d1"
},
"downloads": -1,
"filename": "aiopvpc-4.3.1.tar.gz",
"has_sig": false,
"md5_digest": "0cc514cfcecf8d3aca4a8b5c12d352c4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 12957,
"upload_time": "2024-03-25T08:41:37",
"upload_time_iso_8601": "2024-03-25T08:41:37.900075Z",
"url": "https://files.pythonhosted.org/packages/09/c1/ebb7977ae8c1e9fcd7520a14fd1e82fc9fbe4c691c62cf114f57a1bd3439/aiopvpc-4.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-25 08:41:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "azogue",
"github_project": "aiopvpc",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "aiopvpc"
}