QGIS Server is now packed as a library with an initial (but growing) API and Python bindings. With the new API we have a set of Python tests for the server main component and for the server plugins. Invoking the server from Python is now as easy as:
from qgis.server import QgsServer
headers, body = QgsServer().handleRequest(my_query_string)
For more information see this article
This work has been developed and funded by: Alessandro Pasotti at ItOpen