module documentation

RefererMiddleware: populates Request referer field, based on the Response which originated it.
Class ​Default​Referrer​Policy A variant of "no-referrer-when-downgrade", with the addition that "Referer" is not sent if the parent request was using file:// or s3:// scheme.
Class ​No​Referrer​Policy https://www.w3.org/TR/referrer-policy/#referrer-policy-no-referrer
Class ​No​Referrer​When​Downgrade​Policy https://www.w3.org/TR/referrer-policy/#referrer-policy-no-referrer-when-downgrade
Class ​Origin​Policy https://www.w3.org/TR/referrer-policy/#referrer-policy-origin
Class ​Origin​When​Cross​Origin​Policy https://www.w3.org/TR/referrer-policy/#referrer-policy-origin-when-cross-origin
Class ​Referer​Middleware No class docstring; 0/1 instance variable, 1/4 method, 0/1 class method documented
Class ​Same​Origin​Policy https://www.w3.org/TR/referrer-policy/#referrer-policy-same-origin
Class ​Strict​Origin​Policy https://www.w3.org/TR/referrer-policy/#referrer-policy-strict-origin
Class ​Strict​Origin​When​Cross​Origin​Policy https://www.w3.org/TR/referrer-policy/#referrer-policy-strict-origin-when-cross-origin
Class ​Unsafe​Url​Policy https://www.w3.org/TR/referrer-policy/#referrer-policy-unsafe-url
Constant LOCAL​_SCHEMES Undocumented
Constant POLICY​_NO​_REFERRER Undocumented
Constant POLICY​_NO​_REFERRER​_WHEN​_DOWNGRADE Undocumented
Constant POLICY​_ORIGIN Undocumented
Constant POLICY​_ORIGIN​_WHEN​_CROSS​_ORIGIN Undocumented
Constant POLICY​_SAME​_ORIGIN Undocumented
Constant POLICY​_SCRAPY​_DEFAULT Undocumented
Constant POLICY​_STRICT​_ORIGIN Undocumented
Constant POLICY​_STRICT​_ORIGIN​_WHEN​_CROSS​_ORIGIN Undocumented
Constant POLICY​_UNSAFE​_URL Undocumented
Class ​Referrer​Policy No class docstring; 0/1 class variable, 2/7 methods documented
Function ​_load​_policy​_class Expect a string for the path to the policy class, otherwise try to interpret the string as a standard value from https://www.w3.org/TR/referrer-policy/#referrer-policies
Variable ​_policy​_classes Undocumented
LOCAL_SCHEMES: tuple[str, ...] =

Undocumented

Value
('about', 'blob', 'data', 'filesystem')
POLICY_NO_REFERRER: str =

Undocumented

Value
'no-referrer'
POLICY_NO_REFERRER_WHEN_DOWNGRADE: str =

Undocumented

Value
'no-referrer-when-downgrade'
POLICY_ORIGIN: str =

Undocumented

Value
'origin'
POLICY_ORIGIN_WHEN_CROSS_ORIGIN: str =

Undocumented

Value
'origin-when-cross-origin'
POLICY_SAME_ORIGIN: str =

Undocumented

Value
'same-origin'
POLICY_SCRAPY_DEFAULT: str =

Undocumented

Value
'scrapy-default'
POLICY_STRICT_ORIGIN: str =

Undocumented

Value
'strict-origin'
POLICY_STRICT_ORIGIN_WHEN_CROSS_ORIGIN: str =

Undocumented

Value
'strict-origin-when-cross-origin'
POLICY_UNSAFE_URL: str =

Undocumented

Value
'unsafe-url'
def _load_policy_class(policy, warning_only=False):
Expect a string for the path to the policy class, otherwise try to interpret the string as a standard value from https://www.w3.org/TR/referrer-policy/#referrer-policies
_policy_classes =

Undocumented