Thumblerific is a project mainly written in Python, it's free.
Thumbnail generator API for Google App Engine
Thumblerific lets you make thumbnails from image urls. It runs on Google App Engine.
It works like this
Say you find a hosted image
http://somesite.com/image.jpg
with thumblerific you could make a 90px thumbnail for that image like this
http://thumblerific.appsppot.com/t?image_url=http://somesite.com/image.jpg&width=90
This also allows you to make thumbnails on the fly from your html, calling the <img> tag.
Its that easy and simple.
You can check a demo here
Use Google App Engine