Pl/Python is a stored function language for PostgreSQL that allows you to write database stored functions in python.