The following code snippet demonstrates how to execute an OQL command on the server side, inside the "execute" method of a HTTPServlet?:
from porcupine.oql.command import OqlCommand oCmd = OqlCommand() sOql = "select id, displayName, icon from 'apps' order by displayName asc" apps = oCmd.execute(sOql) for app in apps: self.response.write('App Name: ' + app['displayName'] + '<br>') self.response.write('App icon: ' + app['icon'] + '<br>)