You can configure the endpoint directly or utilize env variables.

export PSW_FORECAST_SITE="http://base.forecast.url"
export PSW_FORECAST_USER="3ScaleUsername"
export PSW_FORECAST_PASSWORD="3ScalePassword"


Used to create and update forecast sources.

from skywise.forecast import Source

# Create a Source
source = Source() = 'tropical-gfe'
source.description = 'WeatherOps AWIPS II GFE tropical forecast.'
source.platform_source_key = 'tropical-gfe'

# Update a Source
source.description = 'WeatherOps GFE Tropical Forecast'

# Find all Sources
sources = Source.find()

# Find source by id, name, or platform source key
tropical_source = Source.find('tropical-gfe')

# Delete a source

Adding and Removing Forecast Products

Each Source has a set of forecast products. A forecast must include parameters for each of these to be considered ‘complete’.

from skywise.platform import Product

# Add a Forecast Product
forecast_product = Product.find('my-24-hr-forecast-product-uuid')

# Retrieve All Forecast Products for a Source
forecast_products = source.get_forecast_products()

# Delete a Source's Forecast Products
[forecast_product.destroy() for forecast_product in forecast_products]


A Forecast is a collection of parameters for which we have forecast data.

import arrow

init_time = arrow.get().datetime
forecasts = source.get_forecasts(initTime=init_time)
if len(forecasts) is 0:
    forecast = source.create_forecast(init_time)

# Find Forecasts by Status
from skywise.forecast import STATUS_INCOMPLETE
pending_forecasts = source.get_forecasts(status=STATUS_INCOMPLETE)

Adding and Removing Forecast Parameters

Forecast Parameters allow us to link a Forecast in the Forecast API to a particular forecast in Platform.

from skywise.platform import Product

product = product.find('my-24-hr-forecast-product-uuid')
platform_forecast = product.get_forecast('platform-forecast-uuid')

Delete a Forecast

Deleting a forecast will also delete all of its associated forecast parameters.