Class: QgsServerParameters

Provides an interface to retrieve and manipulate global parameters received from the client.

Added in version 3.4.

Methods

add

Adds a parameter.

clear

Removes all parameters.

fileName

Returns FILE_NAME parameter as a string or an empty string if not defined.

load

Loads new parameters.

map

Returns MAP parameter as a string or an empty string if not defined.

remove

Removes a parameter.

service

Returns SERVICE parameter as a string or an empty string if not defined.

toMap

Returns all parameters in a map.

urlQuery

Returns a url query with underlying parameters.

value

Returns the value of a parameter.

Virtual Methods

In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsServerParameters. See the FAQ for more details.

loadParameter

Loads a parameter with a specific value.

request

Returns REQUEST parameter as a string or an empty string if not defined.

version

Returns VERSION parameter as a string or an empty string if not defined.

class qgis.server.QgsServerParameters[source]

Bases: object

__init__()

Constructor.

__init__(query: QUrlQuery)

Constructor.

Parameters:

query (QUrlQuery)

__init__(a0: QgsServerParameters)
Parameters:

a0 (QgsServerParameters)

add(self, key: str | None, value: str | None)[source]

Adds a parameter.

Parameters:
  • key (Optional[str]) – the name of the parameter

  • value (Optional[str]) – the value of the parameter

clear(self)[source]

Removes all parameters.

fileName(self) str[source]

Returns FILE_NAME parameter as a string or an empty string if not defined.

Return type:

str

Returns:

filename

load(self, query: QUrlQuery)[source]

Loads new parameters.

Parameters:

query (QUrlQuery) – url query

virtual loadParameter(self, name: str | None, value: str | None) bool[source]

Loads a parameter with a specific value. This method should be implemented in subclasses.

Parameters:
  • name (Optional[str])

  • value (Optional[str])

Return type:

bool

map(self) str[source]

Returns MAP parameter as a string or an empty string if not defined.

Return type:

str

Returns:

map

remove(self, key: str | None)[source]

Removes a parameter.

Parameters:

key (Optional[str]) – the name of the parameter

remove(self, name: QgsServerParameter.Name)[source]

Removes a parameter.

Parameters:

name (QgsServerParameter.Name) – The name of the parameter

Added in version 3.4.

virtual request(self) str[source]

Returns REQUEST parameter as a string or an empty string if not defined.

Return type:

str

Returns:

request

service(self) str[source]

Returns SERVICE parameter as a string or an empty string if not defined.

Return type:

str

Returns:

service

toMap(self) Dict[str, str]

Returns all parameters in a map.

Return type:

Dict[str, str]

urlQuery(self) QUrlQuery[source]

Returns a url query with underlying parameters.

Return type:

QUrlQuery

value(self, key: str | None) str[source]

Returns the value of a parameter.

Parameters:

key (Optional[str]) – the name of the parameter

Return type:

str

virtual version(self) str[source]

Returns VERSION parameter as a string or an empty string if not defined.

Return type:

str

Returns:

version