class environ_property(_DictAccessorProperty[_TAccessorValue]):
Maps request attributes to environment variables. This works not only for the Werkzeug request object, but also any other class with an environ attribute:
>>> class Test(object): ... environ = {'key': 'value'} ... test = environ_property('key') >>> var = Test() >>> var.test 'value'
If you pass it a second value it's used as default if the key does not
exist, the third one can be a converter that takes a value and converts
it. If it raises ValueError
or TypeError
the default value
is used. If no default value is provided None
is used.
Per default the property is read only. You have to explicitly enable it by passing read_only=False to the constructor.
Method | lookup |
Undocumented |
Class Variable | read​_only |
Undocumented |
Undocumented
Parameters | |
obj:Request | Undocumented |
Returns | |
WSGIEnvironment | Undocumented |