From time to time I have the chance to work with PyCairo, the Python bindings to the cairo graphic library. I appreciate this library because it allows to draw graphics primitives so super fast and thus it is very suitable to use it in web projects.
After my trials with GRASS GIS as WMS backend I thought I could create a raster web map service with improved performance by using PyCairo instead of GRASS GIS as renderer.
Lately I explored the capabilities of the Python bindings in GRASS GIS. Since I'm quite familiar with Python web frameworks it was an easy task to wrap the d.mon module and create a Web Map Service based on a GRASS location.
Here I'll show how I implemented the WMS using the Pyramid framework in a single file.