web_programming.current_weather

Attributes

OPENWEATHERMAP_API_KEY

OPENWEATHERMAP_URL_BASE

WEATHERSTACK_API_KEY

WEATHERSTACK_URL_BASE

location

Functions

current_weather(→ list[dict])

Module Contents

web_programming.current_weather.current_weather(location: str) list[dict]
>>> current_weather("location")
Traceback (most recent call last):
    ...
ValueError: No API keys provided or no valid data returned.
web_programming.current_weather.OPENWEATHERMAP_API_KEY = ''
web_programming.current_weather.OPENWEATHERMAP_URL_BASE = 'https://api.openweathermap.org/data/2.5/weather'
web_programming.current_weather.WEATHERSTACK_API_KEY = ''
web_programming.current_weather.WEATHERSTACK_URL_BASE = 'http://api.weatherstack.com/current'
web_programming.current_weather.location = 'to be determined...'