Skip to main content

Asynchronous Python client for getting forecast solar information

Project description

Python API fetching Solarpanels forecast information.

About

With this python library you can request data from Open-Meteo and see what your solar panels may produce in the coming days.

Installation

pip install open-meteo-solar-forecast

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

import asyncio

from open_meteo_solar_forecast import OpenMeteoSolarForecast


async def main() -> None:
    """Show example on how to use the library."""
    async with OpenMeteoSolarForecast(
        latitude=52.16,
        longitude=4.47,
        declination=20,
        azimuth=10,
        dc_kwp=2.160,
    ) as forecast:
        estimate = await forecast.estimate()
        print(estimate)


if __name__ == "__main__":
    asyncio.run(main())
Parameter value type Description
base_url str The base URL of the API (optional)
api_key str Your API key (optional)
declination int The tilt of the solar panels (required)
azimuth int The direction the solar panels are facing (required)
dc_kwp float The size of the solar panels in kWp (required)

Contributing

Would you like to contribute to the development of this project? Then read the prepared contribution guidelines and go ahead!

Thank you for being involved! :heart_eyes:

Setting up development environment

This Python project relies on Poetry as its dependency manager, providing comprehensive management and control over project dependencies.

You need at least:

Install all packages, including all development requirements:

poetry install

Poetry creates by default an virtual environment where it installs all necessary pip packages, to enter or exit the venv run the following commands:

poetry shell
exit

License

MIT License

Copyright (c) 2021-2024 Klaas Schoute
Copyright (c) 2024 Rany

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

open_meteo_solar_forecast-0.1.21.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

open_meteo_solar_forecast-0.1.21-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file open_meteo_solar_forecast-0.1.21.tar.gz.

File metadata

  • Download URL: open_meteo_solar_forecast-0.1.21.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.13.2 Linux/6.12.17-amd64

File hashes

Hashes for open_meteo_solar_forecast-0.1.21.tar.gz
Algorithm Hash digest
SHA256 1919861c1ee8e2b362de48797f863300a6c8d7c44c516159a6a2cf28544b22a6
MD5 4193a3b78b5b8580dc8bac765f9897ac
BLAKE2b-256 6db86b38f9904ef30e61a0f50f1c7ffdfbd008479c7cca78724da362a0276675

See more details on using hashes here.

File details

Details for the file open_meteo_solar_forecast-0.1.21-py3-none-any.whl.

File metadata

File hashes

Hashes for open_meteo_solar_forecast-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 1a15d63ed3e2581a01f15d64d3eb711d8c8950ba81588162252fe2583412b61b
MD5 343b1548bab302f610f0a25e8bf88a4a
BLAKE2b-256 85d358c2492dbd22bcbe47cc50647f14a2d52f6ef0da6b3e51b9477a88ec3a1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page