swowpy

Simple wrapper for OpenWeatherMap


Install
pip install swowpy==0.4.2

Documentation

swowpy

Simple wrapper for openweathermap for Python. Fully compatible with Renpy engine.

How to install it

pip install swowpy

Integration with renpy

Go to the game folder:

pip install --target game/python-packages swowpy

And import in script.py

init python:
   import swowpy

How to use it

Create a swowpy object

api_key = "0a0a0a0a0a0a0a"
mycity = swowpy.Swowpy(api_key,"Granada")

Get weather

It returns "Sun","Clouds"...

mycity.current_weather()
mycity.current_weather("Description") # Provides a description 

Get temperature

mycity.temperature() #Get temperature in Kelvin
mycity.temperature("Celsius") #Get temperature in Celsius

Get wind speed and direction

Returns a tuple with wind speed and wind direction.

mycity.wind() #For example (8.2,240) 

Other methods

humidity() and pressure() are also available.raw() method return the whole JSON response from OpenWeather.