Class: QgsServer

class qgis.server.QgsServer

Bases: sip.wrapper

Creates the server instance

The QgsServer class provides OGC web services.

Enums

Methods

handleRequest

Handles the request.

initPython

Initialize Python

putenv

Set environment variable

serverInterface

Returns a pointer to the server interface

Signals

Attributes

handleRequest(self, request: QgsServerRequest, response: QgsServerResponse, project: QgsProject = None)

Handles the request. The query string is normally read from environment but can be also passed in args and in this case overrides the environment variable

Parameters
  • request – a QgsServerRequest holding request parameters

  • response – a QgsServerResponse for handling response I/O)

  • project – a QgsProject or None, if it is None the project is created from the MAP param specified in request or from the QGIS_PROJECT_FILE setting

initPython(self)

Initialize Python

Note

not available in Python bindings

putenv(self, var: str, val: str)

Set environment variable

Parameters
  • var – environment variable name

  • val – value

New in version 2.14.

serverInterface(self) → QgsServerInterface

Returns a pointer to the server interface