Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example solcast-py API usage.
import solcast
# Fetch latest PV power forecast
pv_power_resp = solcast.get_pv_power_forecasts(-35, 149, capacity=2000, tilt=23, azimuth=0, api_key='INSERTYOURAPIKEYHERE')
# Print soonest PV power forecast
print(pv_power_resp.forecasts[0]['pv_estimate'])
@cjtapper

This comment has been minimized.

Copy link

commented Feb 6, 2017

Couldn't work out how to edit (not even sure if I'm able to edit?), but you missed an 'e' in forecasts on line 3. Also, should probably modify line 3 to use the brackets syntax for print so that it's compatible with both 2.7 and 3.* (i.e., print(pv_power_resp.forecasts[0].pv_estimate))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.