Package mapproxy :: Package core :: Module request :: Class RequestParams
[hide private]
[frames] | no frames]

Class RequestParams

source code

object --+
         |
        RequestParams
Known Subclasses:

This class represents key-value request parameters. It allows case-insensitive access to all keys. Multiple values for a single key will be concatenated (eg. to layers=foo&layers=bar becomes layers: foo,bar).

All values can be accessed as a property.

Instance Methods [hide private]
 
__init__(self, param=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__str__(self)
str(x)
source code
 
get(self, key, default=None, type_func=None)
Returns the value for key or the default.
source code
 
set(self, key, value, append=False, unpack=False)
Set a value for the key.
source code
 
__getattr__(self, name) source code
 
__getitem__(self, key) source code
 
__setitem__(self, key, value)
Set value for the key.
source code
 
__delitem__(self, key) source code
 
iteritems(self) source code
 
__contains__(self, key) source code
 
copy(self) source code
 
with_defaults(self, defaults)
Return this MapRequest with all values from defaults overwritten.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables [hide private]
  params = None
Properties [hide private]
  query_string
The map request as a query string (the order is not guaranteed).

Inherited from object: __class__

Method Details [hide private]

__init__(self, param=None)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Parameters:
  • param - A dict or NoCaseMultiDict.
Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 
str(x)
Overrides: object.__str__
(inherited documentation)

set(self, key, value, append=False, unpack=False)

source code 

Set a value for the key. If append is True the value will be added to other values for this key.

If unpack is True, value will be unpacked and each item will be added.

__setitem__(self, key, value)
(Index assignment operator)

source code 
Set value for the key. Does not append values (see MapRequest.set).

Property Details [hide private]

query_string

The map request as a query string (the order is not guaranteed).

>>> RequestParams(dict(foo='egg', bar='ham%eggs', baz=100)).query_string
'baz=100&foo=egg&bar=ham%25eggs'
Get Method:
unreachable.query_string(self) - The map request as a query string (the order is not guaranteed).