Questions tagged [webob]

Any questions regarding WebOb and its usage in Python WSGI applications.

WebOb is a Python library that provides wrappers around the WSGI request environment, and an object to help create WSGI responses. The objects map much of the specified behavior of HTTP, including header parsing, content negotiation and correct handling of conditional and range requests.

This helps you create rich applications and valid middleware without knowing all the complexities of WSGI and HTTP.

Documentation: WebOb Read the Docs
Source Code: WebOb on Github
Issue Tracker: Github Issues

38 questions
0
votes
1 answer

"Lost data" while processing data in WTForm

I send a HTTP request from a client. Then on the server I try to validate a WTForm Form. from webob.multidict import MultiDict from wtforms import Form, TextField, PasswordField, validators class LoginForm(Form): email = TextField('Email',…
LLaP
  • 2,528
  • 4
  • 22
  • 34
0
votes
1 answer

Pylons: response renaming? Is there a better way?

I've got a Pylons controller with an action called serialize returning content_type=text/csv. I'd like the response of the action to be named based on the input patameter, i.e. for the following route, produced csv file should be named {id}.csv :…
Dave
  • 390
  • 4
  • 12
0
votes
1 answer

I want to serve files from a folder with webob

I want to use webob.static.DirectoryApp. I just can't figure out how to do it: From the example at http://docs.webob.org/en/latest/file-example.html my router looks like: class Router(object): def __init__(self, static_path=None): …
Asken
  • 7,679
  • 10
  • 45
  • 77
0
votes
0 answers

DeadlineExceededError in self.response.write

I'm facing a random DeadlineExceededError exception when writing to the response. Here is my handler: class MyHandler(webapp2.RequestHandler): def get(self): result = [{'id':1},{'id':2}] json_result = json.encode(result) …
Cuong Thai
  • 1,165
  • 1
  • 11
  • 24
0
votes
1 answer

GAE dev server ignoring request module version?

Having the following entry in the libraries section of my app.yaml: - name: webob version: "1.2.3" When I execute the following code import webob print webob.__file__ I get /usr/local/google_appengine/lib/webob-1.1.1/webob/__init__.py even…
Grey Panther
  • 12,870
  • 6
  • 46
  • 64
0
votes
1 answer

globally handle unicode decode errors from webob

I have a large web system written on top of WSGI that uses webob to access form data (no framework is involved). Randomly we'll get unhandled exceptions of UnicodeDecodeError from browsers (or bots) sending in undecodable escape sequences in the…
Jeremy
  • 1,397
  • 2
  • 13
  • 20
0
votes
2 answers

Remote User's hostname + App Engine Python

Similar to: remote_addr - The remote user's IP address. self.request.remote_addr Instead, is there a way to get the remote user's hostname ? Something similar maybe like, self.request.hostname As from the official document, The Request Class,…
MrCooL
  • 926
  • 3
  • 15
  • 30
-3
votes
2 answers

How do you install keystone on RHEL v.7?

I am trying to install keystone (an OpenStack component) on a 64 bit version of RHEL v. 7. I haven't done this before. I run this: yum install openstack-keystone python-keystoneclient I see this at the end: --> Finished Dependency Resolution Error:…
PJ8912
  • 137
  • 3
1 2
3