skillfed

WebOb

WSGI request and response object

webob v1.8.11 6.4M downloads/30d#1,913 on PyPI
Permissive license MIT Active released

What it is and what it does

WebOb is a mature library that wraps WSGI request environments and response objects to provide a more convenient interface for HTTP handling. It lets you read and write request and response data—parsing headers, query strings, cookies, and form data—without directly manipulating the raw WSGI environ dictionary. The library is bidirectional: you can use it to parse incoming HTTP requests or to construct outgoing responses, making it useful both in WSGI applications and for creating HTTP requests programmatically.

The package is actively maintained by the Pylons Project and has recently addressed multiple security issues related to URL handling and open redirects. It supports a range of Python versions and is designed to work with any WSGI-compliant framework or middleware.

Use it for:

  • Parse HTTP request headers, query parameters, and form data in a WSGI application without manual environ manipulation.
  • Construct HTTP responses with proper headers, cookies, and content negotiation in web frameworks.
  • Build HTTP requests programmatically for testing or client-side use.
  • Handle cookie management and SameSite attribute configuration in web applications.
  • Normalize and validate Location headers in redirect responses to prevent open redirect vulnerabilities.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

WebOb provides request and response objects that wrap WSGI environments, offering convenient parsing and construction of HTTP requests and responses.

Yes. WebOb is a stable, actively maintained library with low install friction and permissive licensing. Recent security fixes demonstrate ongoing attention to correctness. Install it if you're building or working with WSGI applications and need convenient request/response handling—it's a standard choice in the Python web ecosystem.

Install

webob on PyPI

pip

pip install webob

uv

uv add webob

poetry

poetry add webob

Installing WebOb

Before you install

Low install friction with a single pure-Python wheel dependency. Actively maintained with recent security fixes; status is active and latest release was 12 days ago.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions.

Quickstart

pip install webob

from webob import Request, Response

req = Request.blank('/path')
resp = Response('Hello World')
resp.headers['Content-Type'] = 'text/plain'

Requires legacy-cgi on Python 3.13+; verify availability in your target environment.

Verify before relying

  • Whether Python 2.7 support is still practical given its EOL status and whether the package's actual test coverage reflects modern Python versions.
  • Current state of the legacy-cgi dependency for Python 3.13+ and whether it introduces any compatibility concerns.

Package facts

License MIT (permissive)
Python support supports the current Python release (!=3.0.*,!=3.1.*,!=3.2.*,>=2.7)
Install friction low — pure-Python wheel
Runtime dependencies 1 — legacy-cgi
Maintenance actively maintained — 12 days since the last release
First released
Downloads 6,426,596/month — #1,913 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: webob-1.8.11-py2.py3-none-any.whl

Keywords: wsgi, request, web, http

Development Status :: 6 - MatureIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP :: WSGITopic :: Internet :: WWW/HTTP :: WSGI :: ApplicationTopic :: Internet :: WWW/HTTP :: WSGI :: Middleware

Tags

wsgi request response objectshttp request parsingwsgi application frameworkhttp header manipulationweb request utilitieswsgi middlewarehttp response building
wsgihttp-utilities

More WSGI packages