Flask Request URL Properties

11/09/2023

This post is a table containing some useful Flask Request properties that contain information about the URL.

Properties

The table below will use the following url as the example:

https://example.com/search/products?name=Ryan&age=25

Property Value
base_url https://example.com/search/products
full_path /search/products?name=Ryan&age=25
host_url https://example.com/
host example.com
path /search/products
query_string b'name=Ryan&age=25'
remote_addr 11.22.33.66 (the client's IP address)
url https://example.com/search/products?name=Ryan&age=25
url_root https://example.com/
url_rule /search/products

© 2024 by Ryan Rickgauer