In this recipe, you will write a Python function for PostGIS using the PL/Python language. The PL/Python procedural language allows you to write PostgreSQL functions with the Python language.
You will use Python to query the http://openweathermap.org/ web services, already used in a previous recipe, to get the weather for a PostGIS geometry from within a PostgreSQL function.