Variables and Functions

class uwsgiconf.options.routing_vars.Var(name)
class uwsgiconf.options.routing_vars.Func(name)
class uwsgiconf.options.routing_vars.VarGeoip(name)

Returns Geoip data.

http://uwsgi.readthedocs.io/en/latest/GeoIP.html

vars_country = ['country_code', 'country_code3', 'country_name']

Keys avaiable for country database.

vars_city = ['continent', 'country_code', 'country_code3', 'country_name', 'region', 'region_name', 'city', 'postal_code', 'lat', 'lon', 'dma', 'area']

Keys avaiable for city database.

class uwsgiconf.options.routing_vars.VarRequest(name)

Returns request variable. Examples: PATH_INFO, SCRIPT_NAME, REQUEST_METHOD.

class uwsgiconf.options.routing_vars.VarMetric(name)

Returns metric (see monitoring) variable.

class uwsgiconf.options.routing_vars.VarCookie(name)

Returns cookie variable

class uwsgiconf.options.routing_vars.VarQuery(name)

Returns query string variable.

class uwsgiconf.options.routing_vars.VarUwsgi(name)

Returns internal uWSGI information.

Supported variables:
  • wid
  • pid
  • uuid
  • status
class uwsgiconf.options.routing_vars.VarTime(name)

Returns time/date in various forms.

Supported variables:
  • unix
class uwsgiconf.options.routing_vars.VarHttptime(name)

Returns http date adding the numeric argument (if specified) to the current time (use empty arg for current server time).

class uwsgiconf.options.routing_vars.FuncMime(name)

Returns mime type of a variable.

class uwsgiconf.options.routing_vars.FuncMath(name)

Perform a math operation. Example: CONTENT_LENGTH+1

Supported operations: + - * /

Warning

Requires matheval support.

class uwsgiconf.options.routing_vars.FuncBase64(name)

Encodes the specified var in base64

class uwsgiconf.options.routing_vars.FuncHex(name)

Encodes the specified var in hex.

class uwsgiconf.options.routing_vars.FuncUpper(name)

Uppercase the specified var.

class uwsgiconf.options.routing_vars.FuncLower(name)

Lowercase the specified var.