a simple Python SDK for the Solcast API
Maintained. Last release 2 months ago, commits in 4 of the last 26 weeks. Weaker on commit activity.
pip install solcast
Solcast API Python SDK
Python SDK to access the Solcast API
Documentation: https://solcast.github.io/solcast-api-python-sdk/
Install
pip install solcast
or from source:
git clone https://github.com/Solcast/solcast-api-python-sdk.git
cd solcast-api-python-sdk
pip install .
The base solcast sdk install requires only the python standard library. Pandas is the only optional dependency that adds functionality to the package.
pip install solcast pandas
The example notebooks use a variety of optional dependencies to showcase different ways in which the Solcast API may be used. To install these dependencies run
pip install solcast[all]
N.B. Installs for [all] using Python 3.8 and Windows will not work due to an issue with pywinpty
Basic Usage
from solcast import live
res = live.radiation_and_weather(
latitude=-33.856784,
longitude=151.215297,
output_parameters=['air_temp', 'dni', 'ghi']
)
res.to_dict()
res.to_pandas() # requires optional pandas installation
Don't forget to set your account Api Key with:
export SOLCAST_API_KEY={your commercial api_key}