Welcome to Solcast
A simple Python SDK that wraps Solcast's API.
From the directory run the following command:
for full functionality install all:
pip install --user solcast[all]
To access Solcast data you will need a commercial API key. If you have the API key already,
you can use it with this library either as an environment variable called SOLCAST_API_KEY,
or you can pass it as an argument
api_key when you call one of the library's methods.
Fetching live radiation and weather data:
When testing or developing, you should use
solcast.unmetered_locations so that your usage isn't counted against your plan.
Unmetered Locations still require you to signup for a commercial API key (above).
from solcast import forecast
from solcast.unmetered_locations import UNMETERED_LOCATIONS
sydney = UNMETERED_LOCATIONS['Sydney Opera House']
res = forecast.rooftop_pv_power(
capacity=5, # 5KW
tilt=22, # degrees
Where the data returned is a timeseries, the response can be converted to a Pandas DataFrame as follows. This is available for all the modules apart from
Pandas is not installed by default to keep the environment light. It is installed with the [all] tag
For all the modules, data can be extracted in Python dictionary format.
Available modules are
from the directory run
localhost:8000 to see the documentation.
Contributing & License
Any type of suggestion and code contribution is welcome as PRs and/or Issues. This repository is licensed under MIT (see LICENSE).