forecast-solar


Nameforecast-solar JSON
Version 3.1.0 PyPI version JSON
download
home_pagehttps://github.com/klaasnicolaas/forecast_solar
SummaryAsynchronous Python client for getting forecast solar information
upload_time2024-04-08 11:12:00
maintainerNone
docs_urlNone
authorKlaas Schoute
requires_pythonNone
licenseMIT license
keywords forecast solar power energy api async client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!--
*** To avoid retyping too much info. Do a search and replace for the following:
*** github_username, repo_name
-->

## Python API fetching Solarpanels forecast information.
<!-- PROJECT SHIELDS -->
![Project Maintenance][maintenance-shield]
[![License][license-shield]](LICENSE)

[![GitHub Activity][commits-shield]][commits]
[![GitHub Last Commit][last-commit-shield]][commits]
[![Contributors][contributors-shield]][contributors-url]

[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]

## About

With this python library you can request data from [forecast.solar](https://forecast.solar) and see what your solar panels may produce in the coming days.

## Installation

```bash
pip install forecast-solar
```

## Data

This library returns a lot of different data, based on the API:

### Energy

- Total Estimated Energy Production - today/tomorrow (kWh)
- Estimated Energy Production - This Hour (kWh)
- Estimated Energy Production - Next Hour (kWh)
- Estimated Energy Production - Remaining today (kWh)

### Power

- Highest Power Peak Time - Today (datetime)
- Highest Power Peak Time - Tomorrow (datetime)
- Estimated Power Production - Now (W)
- Estimated Power Production - Next Hour (W)
- Estimated Power Production - In +6 Hours (W)
- Estimated Power Production - In +12 Hours (W)
- Estimated Power Production - In +24 Hours (W)

### API Info

- Timezone
- Rate limit
- Account type
- Rate remaining

### Validation

- API key (bool)
- Plane (bool)

## Example

```python
import asyncio

from forecast_solar import ForecastSolar


async def main() -> None:
    """Show example on how to use the library."""
    async with ForecastSolar(
        api_key="YOUR_API_KEY",
        latitude=52.16,
        longitude=4.47,
        declination=20,
        azimuth=10,
        kwp=2.160,
        damping=0,
        damping_morning=0.5,
        damping_evening=0.5,
        horizon="0,0,0,10,10,20,20,30,30",
    ) as forecast:
        estimate = await forecast.estimate()
        print(estimate)


if __name__ == "__main__":
    asyncio.run(main())
```

| Parameter | value type | Description |
| --------- | ---------- | ----------- |
| `api_key` | `str` | Your API key from [forecast.solar](https://forecast.solar) (optional) |
| `declination` | `int` | The tilt of the solar panels (required) |
| `azimuth` | `int` | The direction the solar panels are facing (required) |
| `kwp` | `float` | The size of the solar panels in kWp (required) |
| `damping` | `float` | The damping of the solar panels, [read this][forecast-damping] for more information (optional) |
| `damping_morning` | `float` | The damping of the solar panels in the morning (optional) |
| `damping_evening` | `float` | The damping of the solar panels in the evening (optional) |
| `inverter` | `float` | The maximum power of your inverter in kilo watts (optional) |
| `horizon` | `str` | A list of **comma separated** degrees values, [read this][forecast-horizon] for more information (optional) |

## Contributing

Would you like to contribute to the development of this project? Then read the prepared [contribution guidelines](CONTRIBUTING.md) and go ahead!

Thank you for being involved! :heart_eyes:

## License

MIT License

Copyright (c) 2021-2024 Klaas Schoute

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

<!-- LINKS -->
[forecast-horizon]: https://doc.forecast.solar/doku.php?id=api#horizon
[forecast-damping]: https://doc.forecast.solar/doku.php?id=damping

<!-- MARKDOWN LINKS & IMAGES -->
[maintenance-shield]: https://img.shields.io/maintenance/yes/2024.svg?style=for-the-badge
[contributors-shield]: https://img.shields.io/github/contributors/home-assistant-libs/forecast_solar.svg?style=for-the-badge
[contributors-url]: https://github.com/home-assistant-libs/forecast_solar/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/home-assistant-libs/forecast_solar.svg?style=for-the-badge
[forks-url]: https://github.com/home-assistant-libs/forecast_solar/network/members
[stars-shield]: https://img.shields.io/github/stars/home-assistant-libs/forecast_solar.svg?style=for-the-badge
[stars-url]: https://github.com/home-assistant-libs/forecast_solar/stargazers
[issues-shield]: https://img.shields.io/github/issues/home-assistant-libs/forecast_solar.svg?style=for-the-badge
[issues-url]: https://github.com/home-assistant-libs/forecast_solar/issues
[license-shield]: https://img.shields.io/github/license/home-assistant-libs/forecast_solar.svg?style=for-the-badge
[commits-shield]: https://img.shields.io/github/commit-activity/y/home-assistant-libs/forecast_solar.svg?style=for-the-badge
[commits]: https://github.com/home-assistant-libs/forecast_solar/commits/master
[last-commit-shield]: https://img.shields.io/github/last-commit/home-assistant-libs/forecast_solar.svg?style=for-the-badge

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/klaasnicolaas/forecast_solar",
    "name": "forecast-solar",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "forecast, solar, power, energy, api, async, client",
    "author": "Klaas Schoute",
    "author_email": "hello@student-techlife.com",
    "download_url": "https://files.pythonhosted.org/packages/a8/d5/8b360d690fe4cdd18ccff67f5233cb36212184ecb02da672ea2aad424d8a/forecast_solar-3.1.0.tar.gz",
    "platform": null,
    "description": "<!--\n*** To avoid retyping too much info. Do a search and replace for the following:\n*** github_username, repo_name\n-->\n\n## Python API fetching Solarpanels forecast information.\n<!-- PROJECT SHIELDS -->\n![Project Maintenance][maintenance-shield]\n[![License][license-shield]](LICENSE)\n\n[![GitHub Activity][commits-shield]][commits]\n[![GitHub Last Commit][last-commit-shield]][commits]\n[![Contributors][contributors-shield]][contributors-url]\n\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n\n## About\n\nWith this python library you can request data from [forecast.solar](https://forecast.solar) and see what your solar panels may produce in the coming days.\n\n## Installation\n\n```bash\npip install forecast-solar\n```\n\n## Data\n\nThis library returns a lot of different data, based on the API:\n\n### Energy\n\n- Total Estimated Energy Production - today/tomorrow (kWh)\n- Estimated Energy Production - This Hour (kWh)\n- Estimated Energy Production - Next Hour (kWh)\n- Estimated Energy Production - Remaining today (kWh)\n\n### Power\n\n- Highest Power Peak Time - Today (datetime)\n- Highest Power Peak Time - Tomorrow (datetime)\n- Estimated Power Production - Now (W)\n- Estimated Power Production - Next Hour (W)\n- Estimated Power Production - In +6 Hours (W)\n- Estimated Power Production - In +12 Hours (W)\n- Estimated Power Production - In +24 Hours (W)\n\n### API Info\n\n- Timezone\n- Rate limit\n- Account type\n- Rate remaining\n\n### Validation\n\n- API key (bool)\n- Plane (bool)\n\n## Example\n\n```python\nimport asyncio\n\nfrom forecast_solar import ForecastSolar\n\n\nasync def main() -> None:\n    \"\"\"Show example on how to use the library.\"\"\"\n    async with ForecastSolar(\n        api_key=\"YOUR_API_KEY\",\n        latitude=52.16,\n        longitude=4.47,\n        declination=20,\n        azimuth=10,\n        kwp=2.160,\n        damping=0,\n        damping_morning=0.5,\n        damping_evening=0.5,\n        horizon=\"0,0,0,10,10,20,20,30,30\",\n    ) as forecast:\n        estimate = await forecast.estimate()\n        print(estimate)\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n| Parameter | value type | Description |\n| --------- | ---------- | ----------- |\n| `api_key` | `str` | Your API key from [forecast.solar](https://forecast.solar) (optional) |\n| `declination` | `int` | The tilt of the solar panels (required) |\n| `azimuth` | `int` | The direction the solar panels are facing (required) |\n| `kwp` | `float` | The size of the solar panels in kWp (required) |\n| `damping` | `float` | The damping of the solar panels, [read this][forecast-damping] for more information (optional) |\n| `damping_morning` | `float` | The damping of the solar panels in the morning (optional) |\n| `damping_evening` | `float` | The damping of the solar panels in the evening (optional) |\n| `inverter` | `float` | The maximum power of your inverter in kilo watts (optional) |\n| `horizon` | `str` | A list of **comma separated** degrees values, [read this][forecast-horizon] for more information (optional) |\n\n## Contributing\n\nWould you like to contribute to the development of this project? Then read the prepared [contribution guidelines](CONTRIBUTING.md) and go ahead!\n\nThank you for being involved! :heart_eyes:\n\n## License\n\nMIT License\n\nCopyright (c) 2021-2024 Klaas Schoute\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n<!-- LINKS -->\n[forecast-horizon]: https://doc.forecast.solar/doku.php?id=api#horizon\n[forecast-damping]: https://doc.forecast.solar/doku.php?id=damping\n\n<!-- MARKDOWN LINKS & IMAGES -->\n[maintenance-shield]: https://img.shields.io/maintenance/yes/2024.svg?style=for-the-badge\n[contributors-shield]: https://img.shields.io/github/contributors/home-assistant-libs/forecast_solar.svg?style=for-the-badge\n[contributors-url]: https://github.com/home-assistant-libs/forecast_solar/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/home-assistant-libs/forecast_solar.svg?style=for-the-badge\n[forks-url]: https://github.com/home-assistant-libs/forecast_solar/network/members\n[stars-shield]: https://img.shields.io/github/stars/home-assistant-libs/forecast_solar.svg?style=for-the-badge\n[stars-url]: https://github.com/home-assistant-libs/forecast_solar/stargazers\n[issues-shield]: https://img.shields.io/github/issues/home-assistant-libs/forecast_solar.svg?style=for-the-badge\n[issues-url]: https://github.com/home-assistant-libs/forecast_solar/issues\n[license-shield]: https://img.shields.io/github/license/home-assistant-libs/forecast_solar.svg?style=for-the-badge\n[commits-shield]: https://img.shields.io/github/commit-activity/y/home-assistant-libs/forecast_solar.svg?style=for-the-badge\n[commits]: https://github.com/home-assistant-libs/forecast_solar/commits/master\n[last-commit-shield]: https://img.shields.io/github/last-commit/home-assistant-libs/forecast_solar.svg?style=for-the-badge\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Asynchronous Python client for getting forecast solar information",
    "version": "3.1.0",
    "project_urls": {
        "Homepage": "https://github.com/klaasnicolaas/forecast_solar"
    },
    "split_keywords": [
        "forecast",
        " solar",
        " power",
        " energy",
        " api",
        " async",
        " client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "59a8e989f2563f4d2d587ef369069883c96fa76c38d20af3c78892390e057d79",
                "md5": "eef5c9c502b1bf3ec3e5c872f7f5eb98",
                "sha256": "d5b3e4dfb60fa35877edd3e9306cf02a40b979f1cc66e7fbdb3cb1a8ee647980"
            },
            "downloads": -1,
            "filename": "forecast_solar-3.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "eef5c9c502b1bf3ec3e5c872f7f5eb98",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9271,
            "upload_time": "2024-04-08T11:11:58",
            "upload_time_iso_8601": "2024-04-08T11:11:58.920874Z",
            "url": "https://files.pythonhosted.org/packages/59/a8/e989f2563f4d2d587ef369069883c96fa76c38d20af3c78892390e057d79/forecast_solar-3.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a8d58b360d690fe4cdd18ccff67f5233cb36212184ecb02da672ea2aad424d8a",
                "md5": "1f37e7637c7fb1ddcc646a38d7edebd9",
                "sha256": "9485ec216ef4fbe140f87835572199dc47644a4aca93d8224c89dce826d8243f"
            },
            "downloads": -1,
            "filename": "forecast_solar-3.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "1f37e7637c7fb1ddcc646a38d7edebd9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10823,
            "upload_time": "2024-04-08T11:12:00",
            "upload_time_iso_8601": "2024-04-08T11:12:00.665178Z",
            "url": "https://files.pythonhosted.org/packages/a8/d5/8b360d690fe4cdd18ccff67f5233cb36212184ecb02da672ea2aad424d8a/forecast_solar-3.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-08 11:12:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "klaasnicolaas",
    "github_project": "forecast_solar",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "forecast-solar"
}
        
Elapsed time: 0.23120s