Skip to content

Welcome to Solcast

A simple Python SDK that wraps Solcast's API.

Install

From the directory run the following command:

pip install --user solcast

Tip

for full functionality install all: pip install --user solcast[all]

Usage

Warning

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:

from solcast import live

res = live.radiation_and_weather(
    latitude=-33.856784,
    longitude=151.215297,
    output_parameters=['air_temp', 'dni', 'ghi']
)

as a Pandas DataFrame

df = res.to_pandas()

Info

Pandas is not installed by default to keep the environment light. It is installed with the [all] tag

Available modules are

Module API Docs
live solcast.live
historic solcast.historic
forecast solcast.forecast
tmy solcast.tmy

Docs

from the directory run

mkdocs build
mkdocs serve
In a browser navigate to 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).