[![size_badge](https://img.shields.io/github/repo-size/gjohansson-ST/pysmhi?style=for-the-badge&cacheSeconds=3600)](https://github.com/gjohansson-ST/pysmhi)
[![version_badge](https://img.shields.io/github/v/release/gjohansson-ST/pysmhi?label=Latest%20release&style=for-the-badge&cacheSeconds=3600)](https://github.com/gjohansson-ST/pysmhi/releases/latest)
[![download_badge](https://img.shields.io/pypi/dm/pysmhi?style=for-the-badge&cacheSeconds=3600)](https://github.com/gjohansson-ST/pysmhi/releases/latest)
![GitHub Repo stars](https://img.shields.io/github/stars/gjohansson-ST/pysmhi?style=for-the-badge&cacheSeconds=3600)
![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/gjohansson-ST/pysmhi?style=for-the-badge&cacheSeconds=3600)
![GitHub License](https://img.shields.io/github/license/gjohansson-ST/pysmhi?style=for-the-badge&cacheSeconds=3600)
[![Made for Home Assistant](https://img.shields.io/badge/Made_for-Home%20Assistant-blue?style=for-the-badge&logo=homeassistant)](https://github.com/home-assistant)
[![Sponsor me](https://img.shields.io/badge/Sponsor-Me-blue?style=for-the-badge&logo=github)](https://github.com/sponsors/gjohansson-ST)
[![Discord](https://img.shields.io/discord/872446427664625664?style=for-the-badge&label=Discord&cacheSeconds=3600)](https://discord.gg/EG7cWFQMGW)
# pysmhi
python module for communicating with [Nord Pool](https://data.nordpoolgroup.com/auction/day-ahead/prices)
**Supports**
- Daily forecast
- Hourly forecast
- Bi-daily forecast
## Code example
### Get daily forecast
Hourly rates from provided date
```python
from pysmhi import SMHIForecast, SMHIPointForecast
async with aiohttp.ClientSession(loop=loop) as session:
client = SMHIPointForecast("16.15035", "58.570784", session)
daily_forecast: list[SMHIForecast] = await forecast.async_get_daily_forecast()
print(daily_forecast)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/gjohansson-ST/pysmhi",
"name": "pysmhi",
"maintainer": "G Johansson",
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": "goran.johansson@shiftit.se",
"keywords": "smhi, api, async, client",
"author": "G Johansson",
"author_email": "goran.johansson@shiftit.se",
"download_url": "https://files.pythonhosted.org/packages/a5/86/1c67e4c5b70638ee2b4a290ce827cec086a45f6b5976fe85fe4a7ec77a5d/pysmhi-1.0.0.tar.gz",
"platform": null,
"description": "[![size_badge](https://img.shields.io/github/repo-size/gjohansson-ST/pysmhi?style=for-the-badge&cacheSeconds=3600)](https://github.com/gjohansson-ST/pysmhi)\n[![version_badge](https://img.shields.io/github/v/release/gjohansson-ST/pysmhi?label=Latest%20release&style=for-the-badge&cacheSeconds=3600)](https://github.com/gjohansson-ST/pysmhi/releases/latest)\n[![download_badge](https://img.shields.io/pypi/dm/pysmhi?style=for-the-badge&cacheSeconds=3600)](https://github.com/gjohansson-ST/pysmhi/releases/latest)\n![GitHub Repo stars](https://img.shields.io/github/stars/gjohansson-ST/pysmhi?style=for-the-badge&cacheSeconds=3600)\n![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/gjohansson-ST/pysmhi?style=for-the-badge&cacheSeconds=3600)\n![GitHub License](https://img.shields.io/github/license/gjohansson-ST/pysmhi?style=for-the-badge&cacheSeconds=3600)\n\n[![Made for Home Assistant](https://img.shields.io/badge/Made_for-Home%20Assistant-blue?style=for-the-badge&logo=homeassistant)](https://github.com/home-assistant)\n\n[![Sponsor me](https://img.shields.io/badge/Sponsor-Me-blue?style=for-the-badge&logo=github)](https://github.com/sponsors/gjohansson-ST)\n[![Discord](https://img.shields.io/discord/872446427664625664?style=for-the-badge&label=Discord&cacheSeconds=3600)](https://discord.gg/EG7cWFQMGW)\n\n# pysmhi\n\npython module for communicating with [Nord Pool](https://data.nordpoolgroup.com/auction/day-ahead/prices)\n\n**Supports**\n\n- Daily forecast\n- Hourly forecast\n- Bi-daily forecast\n\n## Code example\n\n### Get daily forecast\n\nHourly rates from provided date\n\n```python\nfrom pysmhi import SMHIForecast, SMHIPointForecast\n\nasync with aiohttp.ClientSession(loop=loop) as session:\n client = SMHIPointForecast(\"16.15035\", \"58.570784\", session)\n daily_forecast: list[SMHIForecast] = await forecast.async_get_daily_forecast()\n print(daily_forecast)\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Retrieve open data from SMHI api.",
"version": "1.0.0",
"project_urls": {
"Bug Tracker": "https://github.com/gjohansson-ST/pysmhi/issues",
"Changelog": "https://github.com/gjohansson-ST/pysmhi/releases",
"Documentation": "https://github.com/gjohansson-ST/pysmhi",
"Homepage": "https://github.com/gjohansson-ST/pysmhi",
"Repository": "https://github.com/gjohansson-ST/pysmhi"
},
"split_keywords": [
"smhi",
" api",
" async",
" client"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dd489cdd896fa7fcc0861e23896700be4e449c21fe1dccdcd44d4f73d067d967",
"md5": "e842b957a028a33bb12b144ffdd6fc0c",
"sha256": "2bfdf80ee41025b38c0a2dc310b753a494b80d008f052424546132b748e1e815"
},
"downloads": -1,
"filename": "pysmhi-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e842b957a028a33bb12b144ffdd6fc0c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 7475,
"upload_time": "2025-01-23T20:38:27",
"upload_time_iso_8601": "2025-01-23T20:38:27.723584Z",
"url": "https://files.pythonhosted.org/packages/dd/48/9cdd896fa7fcc0861e23896700be4e449c21fe1dccdcd44d4f73d067d967/pysmhi-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a5861c67e4c5b70638ee2b4a290ce827cec086a45f6b5976fe85fe4a7ec77a5d",
"md5": "9e6545ef0baf53e9cc6c09a2fab2d8c4",
"sha256": "29cca5f4c646c270324d0fc00d2493dd9d76b0dce1db58096b291cfc791cdd03"
},
"downloads": -1,
"filename": "pysmhi-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "9e6545ef0baf53e9cc6c09a2fab2d8c4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 11690,
"upload_time": "2025-01-23T20:38:32",
"upload_time_iso_8601": "2025-01-23T20:38:32.204974Z",
"url": "https://files.pythonhosted.org/packages/a5/86/1c67e4c5b70638ee2b4a290ce827cec086a45f6b5976fe85fe4a7ec77a5d/pysmhi-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-23 20:38:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "gjohansson-ST",
"github_project": "pysmhi",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pysmhi"
}