def fetchState()

in cloud-run-alwayson-cpu-weather-advisory/python/main.py [0:0]


def fetchState(state):
    'fetch state weather alerts from API'
    rsp = requests.get(URL % state)  # call weather API
    if rsp.status_code >= 400:
        rsp.raise_for_status()
    advisories = rsp.json()['features']
    return [_etl(advisory, state) for advisory in advisories]