Simple wrapper for OpenWeatherMap
pip install swowpy==0.4.2
Simple wrapper for openweathermap for Python. Fully compatible with Renpy engine.
pip install swowpy
Go to the game folder:
pip install --target game/python-packages swowpy
And import in script.py
init python:
import swowpy
api_key = "0a0a0a0a0a0a0a"
mycity = swowpy.Swowpy(api_key,"Granada")
It returns "Sun","Clouds"...
mycity.current_weather()
mycity.current_weather("Description") # Provides a description
mycity.temperature() #Get temperature in Kelvin
mycity.temperature("Celsius") #Get temperature in Celsius
Returns a tuple with wind speed and wind direction.
mycity.wind() #For example (8.2,240)
humidity() and pressure() are also available.raw() method return the whole JSON response from OpenWeather.