Class: QgsServer

A server which provides OGC web services.

Methods

handleRequest

Handles the request.

initPython

Initialize Python

putenv

Set environment variable

serverInterface

Returns a pointer to the server interface

class qgis.server.QgsServer[source]

Bases: object

__init__()

Creates the server instance

handleRequest(self, request: QgsServerRequest, response: QgsServerResponse, project: QgsProject | None = None)[source]

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:
initPython(self)[source]

Initialize Python

Note

not available in Python bindings

putenv(self, var: str | None, val: str | None)[source]

Set environment variable

Parameters:
  • var (Optional[str]) – environment variable name

  • val (Optional[str]) – value

serverInterface(self) QgsServerInterface | None

Returns a pointer to the server interface

Return type:

Optional[QgsServerInterface]