CodeVetter · Repo Unpack · Feature catalog
pallets/werkzeug
The developer-facing features cover HTTP request interpretation, response construction, routing, file transfer, security helpers, and testing. Middleware adds application composition and operational diagnostics. Development tooling includes a server, reloader, and browser debugger. The inspected example demonstrates user-facing URL creation, redirects, and click statistics.
- Request exposes query parameters and cookies as immutable multidicts, form fields through lazy parsing, and JSON parsing with force, silent, and cache controls.
- Response supports streaming WSGI output and suppresses bodies for HEAD, informational responses, 204, and 304; cookie setters expose Secure, HttpOnly, SameSite, and Partitioned attributes.
- Routing supports string, any, path, integer, float, and UUID converters, canonical redirects, method restrictions, and distinct WebSocket matching.
- send_file provides attachment naming, MIME inference, cache metadata, conditional responses, ranges, and X-Sendfile; SharedDataMiddleware maps URL prefixes to filesystem or package resources.
- Security helpers generate scrypt or PBKDF2 password hashes, compare stored hashes with hmac.compare_digest, and validate untrusted URL path components with safe_join.
- Middleware can mount WSGI applications by path, rewrite trusted forwarded metadata, proxy HTTP requests, lint protocol behavior, and profile requests with optional output files.
- Development serving selects single-process, threaded, or forked servers, optionally adds debugging/static middleware, and supports automatic reloading; Client simulates WSGI requests and follows redirects without a server.
- Shortly offers POST / to create a short URL, /<short_id> to increment clicks and redirect, and /<short_id>+ to display target and click-count details; missing identifiers produce its custom 404 page.