Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 1.25 KB

README.rst

File metadata and controls

52 lines (33 loc) · 1.25 KB

solcast-py

A Python client library for the Solcast API for photovoltaic power and solar radiation forecasting.

Sign up and find out more at https://solcast.com.au/api/ .

More documentation coming soon...

GitHub install

$ git clone https://github.com/FidFenix/Radiation.git
$ cd Radiation
$ python setup.py install

Providing the API key

An API key is required to use the Solcast API. You can sign up for one at https://solcast.com.au

There are multiple ways of providing the API key to solcast-py:

Setting an environment variable

You can set the environment variable SOLCAST_API_KEY:

$ export SOLCAST_API_KEY=<insert your API key here>

To persist this between sessions, add this line to your .bashrc (or equivalent).

Positional or keyword argument

Alternatively, you can pass the API key as the final positional argument, or the keyword argument api_key. For example:

>>> solcast.get_radiation_forecasts(-35, 149, hours=24)

or:

>>> solcast.get_pv_power_forecasts(-35, 149, capacity=2000, api_key='INSERTYOURAPIKEYHERE')