Posts tagged python

Creating URL-encoded URLs in Falcon web framework on Aug 02, 2023 python falcon-framework

REST APIs can pass another URL as part of the API’s URL. E.g., /cache/foo%2Fbar.html is passing foo/bar.html to /cache/ endpoint. Building these APIs in Python is difficult because of the unfortunate omission of the WSGI specification that doesn’t provide the means to access the raw request URL.

Centralized user messages in Python apps on Jul 16, 2023 python falcon-framework

Helpful errors with error codes. Do you love it too? During the development of the Snippets, an online preview tool for reStructuredText (and Markdown coming soon), I tried to produce actually helpful messages to the API user. I started with collecting text strings that could appear to users across the codebase and put them into a single file.

URL encoding on Jun 15, 2023 python

URL encoding (also known as percentage encoding) is a way to pass around characters otherwise prohibited in the URL and HTML forms because they have special meanings. For example, to use http:// as part of a URL, not its beginning, it has to be %-encoded to http%3A%2F%2F.