doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
parameter_storage_class alias of werkzeug.datastructures.ImmutableMultiDict
werkzeug.wrappers.index#werkzeug.wrappers.Request.parameter_storage_class
path The path part of the URL after root_path. This is the path used for routing within the application.
werkzeug.wrappers.index#werkzeug.wrappers.Request.path
query_string The part of the URL after the “?”. This is the raw value, use args for the parsed values.
werkzeug.wrappers.index#werkzeug.wrappers.Request.query_string
referrer The Referer[sic] request-header field allows the client to specify, for the server’s benefit, the address (URI) of the resource from which the Request-URI was obtained (the “referrer”, although the header field is misspelled).
werkzeug.wrappers.index#werkzeug.wrappers.Request.referrer
remote_addr The address of the client sending the request.
werkzeug.wrappers.index#werkzeug.wrappers.Request.remote_addr
remote_user If the server supports user authentication, and the script is protected, this attribute contains the username the user has authenticated as.
werkzeug.wrappers.index#werkzeug.wrappers.Request.remote_user
root_path The prefix that the application is mounted under, without a trailing slash. path comes after this.
werkzeug.wrappers.index#werkzeug.wrappers.Request.root_path
scheme The URL scheme of the protocol the request used, such as https or wss.
werkzeug.wrappers.index#werkzeug.wrappers.Request.scheme
server The address of the server. (host, port), (path, None) for unix sockets, or None if not known.
werkzeug.wrappers.index#werkzeug.wrappers.Request.server
shallow: bool Set when creating the request object. If True, reading from the request body will cause a RuntimeException. Useful to prevent modifying the stream from middleware.
werkzeug.wrappers.index#werkzeug.wrappers.Request.shallow
user_agent_class alias of werkzeug.useragents._UserAgent
werkzeug.wrappers.index#werkzeug.wrappers.Request.user_agent_class
_get_file_stream(total_content_length, content_type, filename=None, content_length=None) Called to get a stream for the file upload. This must provide a file-like class with read(), readline() and seek() methods that is both writeable and readable. The default implementation returns a temporary file if the total cont...
werkzeug.wrappers.index#werkzeug.wrappers.Request._get_file_stream
class werkzeug.datastructures.RequestCacheControl(values=(), on_update=None) A cache control for requests. This is immutable and gives access to all the request-relevant cache control headers. To get a header of the RequestCacheControl object again you can convert the object into a string or call the to_header() meth...
werkzeug.datastructures.index#werkzeug.datastructures.RequestCacheControl
max_age accessor for ‘max-age’
werkzeug.datastructures.index#werkzeug.datastructures.RequestCacheControl.max_age
no_cache accessor for ‘no-cache’
werkzeug.datastructures.index#werkzeug.datastructures.RequestCacheControl.no_cache
no_store accessor for ‘no-store’
werkzeug.datastructures.index#werkzeug.datastructures.RequestCacheControl.no_store
no_transform accessor for ‘no-transform’
werkzeug.datastructures.index#werkzeug.datastructures.RequestCacheControl.no_transform
werkzeug.wsgi.responder(f) Marks a function as responder. Decorate a function with it and it will automatically call the return value as WSGI application. Example: @responder def application(environ, start_response): return Response('Hello World!') Parameters f (Callable[[...], WSGIApplication]) – Return typ...
werkzeug.wsgi.index#werkzeug.wsgi.responder
class werkzeug.wrappers.Response(response=None, status=None, headers=None, mimetype=None, content_type=None, direct_passthrough=False) Represents an outgoing WSGI HTTP response with body, status, and headers. Has properties and methods for using the functionality defined by various HTTP specs. The response body is fl...
werkzeug.wrappers.index#werkzeug.wrappers.Response
accept_ranges The Accept-Ranges header. Even though the name would indicate that multiple values are supported, it must be one string token only. The values 'bytes' and 'none' are common. Changelog New in version 0.7.
werkzeug.wrappers.index#werkzeug.wrappers.Response.accept_ranges
access_control_allow_headers Which headers can be sent with the cross origin request.
werkzeug.wrappers.index#werkzeug.wrappers.Response.access_control_allow_headers
access_control_allow_methods Which methods can be used for the cross origin request.
werkzeug.wrappers.index#werkzeug.wrappers.Response.access_control_allow_methods
access_control_allow_origin The origin or ‘*’ for any origin that may make cross origin requests.
werkzeug.wrappers.index#werkzeug.wrappers.Response.access_control_allow_origin
access_control_expose_headers Which headers can be shared by the browser to JavaScript code.
werkzeug.wrappers.index#werkzeug.wrappers.Response.access_control_expose_headers
access_control_max_age The maximum age in seconds the access control settings can be cached for.
werkzeug.wrappers.index#werkzeug.wrappers.Response.access_control_max_age
add_etag(overwrite=False, weak=False) Add an etag for the current response if there is none yet. Changed in version 2.0: SHA-1 is used to generate the value. MD5 may not be available in some environments. Parameters overwrite (bool) – weak (bool) – Return type None
werkzeug.wrappers.index#werkzeug.wrappers.Response.add_etag
age The Age response-header field conveys the sender’s estimate of the amount of time since the response (or its revalidation) was generated at the origin server. Age values are non-negative decimal integers, representing time in seconds.
werkzeug.wrappers.index#werkzeug.wrappers.Response.age
autocorrect_location_header = True Should this response object correct the location header to be RFC conformant? This is true by default. Changelog New in version 0.8.
werkzeug.wrappers.index#werkzeug.wrappers.Response.autocorrect_location_header
automatically_set_content_length = True Should this response object automatically set the content-length header if possible? This is true by default. Changelog New in version 0.8.
werkzeug.wrappers.index#werkzeug.wrappers.Response.automatically_set_content_length
calculate_content_length() Returns the content length if available or None otherwise. Return type Optional[int]
werkzeug.wrappers.index#werkzeug.wrappers.Response.calculate_content_length
call_on_close(func) Adds a function to the internal list of functions that should be called as part of closing down the response. Since 0.7 this function also returns the function that was passed so that this can be used as a decorator. Changelog New in version 0.6. Parameters func (Callable[[], Any]) – Return ...
werkzeug.wrappers.index#werkzeug.wrappers.Response.call_on_close
close() Close the wrapped response if possible. You can also use the object in a with statement which will automatically close it. Changelog New in version 0.9: Can now be used in a with statement. Return type None
werkzeug.wrappers.index#werkzeug.wrappers.Response.close
content_encoding The Content-Encoding entity-header field is used as a modifier to the media-type. When present, its value indicates what additional content codings have been applied to the entity-body, and thus what decoding mechanisms must be applied in order to obtain the media-type referenced by the Content-Type ...
werkzeug.wrappers.index#werkzeug.wrappers.Response.content_encoding
content_length The Content-Length entity-header field indicates the size of the entity-body, in decimal number of OCTETs, sent to the recipient or, in the case of the HEAD method, the size of the entity-body that would have been sent had the request been a GET.
werkzeug.wrappers.index#werkzeug.wrappers.Response.content_length
content_location The Content-Location entity-header field MAY be used to supply the resource location for the entity enclosed in the message when that entity is accessible from a location separate from the requested resource’s URI.
werkzeug.wrappers.index#werkzeug.wrappers.Response.content_location
content_md5 The Content-MD5 entity-header field, as defined in RFC 1864, is an MD5 digest of the entity-body for the purpose of providing an end-to-end message integrity check (MIC) of the entity-body. (Note: a MIC is good for detecting accidental modification of the entity-body in transit, but is not proof against m...
werkzeug.wrappers.index#werkzeug.wrappers.Response.content_md5
content_security_policy The Content-Security-Policy header adds an additional layer of security to help detect and mitigate certain types of attacks.
werkzeug.wrappers.index#werkzeug.wrappers.Response.content_security_policy
content_security_policy_report_only The Content-Security-Policy-Report-Only header adds a csp policy that is not enforced but is reported thereby helping detect certain types of attacks.
werkzeug.wrappers.index#werkzeug.wrappers.Response.content_security_policy_report_only
content_type The Content-Type entity-header field indicates the media type of the entity-body sent to the recipient or, in the case of the HEAD method, the media type that would have been sent had the request been a GET.
werkzeug.wrappers.index#werkzeug.wrappers.Response.content_type
cross_origin_embedder_policy Prevents a document from loading any cross-origin resources that do not explicitly grant the document permission. Values must be a member of the werkzeug.http.COEP enum.
werkzeug.wrappers.index#werkzeug.wrappers.Response.cross_origin_embedder_policy
cross_origin_opener_policy Allows control over sharing of browsing context group with cross-origin documents. Values must be a member of the werkzeug.http.COOP enum.
werkzeug.wrappers.index#werkzeug.wrappers.Response.cross_origin_opener_policy
date The Date general-header field represents the date and time at which the message was originated, having the same semantics as orig-date in RFC 822. Changed in version 2.0: The datetime object is timezone-aware.
werkzeug.wrappers.index#werkzeug.wrappers.Response.date
delete_cookie(key, path='/', domain=None, secure=False, httponly=False, samesite=None) Delete a cookie. Fails silently if key doesn’t exist. Parameters key (str) – the key (name) of the cookie to be deleted. path (str) – if the cookie that should be deleted was limited to a path, the path has to be defined here....
werkzeug.wrappers.index#werkzeug.wrappers.Response.delete_cookie
direct_passthrough Pass the response body directly through as the WSGI iterable. This can be used when the body is a binary file or other iterator of bytes, to skip some unnecessary checks. Use send_file() instead of setting this manually.
werkzeug.wrappers.index#werkzeug.wrappers.Response.direct_passthrough
expires The Expires entity-header field gives the date/time after which the response is considered stale. A stale cache entry may not normally be returned by a cache. Changed in version 2.0: The datetime object is timezone-aware.
werkzeug.wrappers.index#werkzeug.wrappers.Response.expires
classmethod force_type(response, environ=None) Enforce that the WSGI response is a response object of the current type. Werkzeug will use the Response internally in many situations like the exceptions. If you call get_response() on an exception you will get back a regular Response object, even if you are using a cust...
werkzeug.wrappers.index#werkzeug.wrappers.Response.force_type
freeze(no_etag=None) Make the response object ready to be pickled. Does the following: Buffer the response into a list, ignoring implicity_sequence_conversion and direct_passthrough. Set the Content-Length header. Generate an ETag header if one is not already set. Changed in version 2.0: An ETag header is added, t...
werkzeug.wrappers.index#werkzeug.wrappers.Response.freeze
classmethod from_app(app, environ, buffered=False) Create a new response object from an application output. This works best if you pass it an application that returns a generator all the time. Sometimes applications may use the write() callable returned by the start_response function. This tries to resolve such edge ...
werkzeug.wrappers.index#werkzeug.wrappers.Response.from_app
get_app_iter(environ) Returns the application iterator for the given environ. Depending on the request method and the current status code the return value might be an empty response rather than the one from the response. If the request method is HEAD or the status code is in a range where the HTTP specification requi...
werkzeug.wrappers.index#werkzeug.wrappers.Response.get_app_iter
get_data(as_text=False) The string representation of the response body. Whenever you call this property the response iterable is encoded and flattened. This can lead to unwanted behavior if you stream big data. This behavior can be disabled by setting implicit_sequence_conversion to False. If as_text is set to True t...
werkzeug.wrappers.index#werkzeug.wrappers.Response.get_data
get_etag() Return a tuple in the form (etag, is_weak). If there is no ETag the return value is (None, None). Return type Union[Tuple[str, bool], Tuple[None, None]]
werkzeug.wrappers.index#werkzeug.wrappers.Response.get_etag
get_json(force=False, silent=False) Parse data as JSON. Useful during testing. If the mimetype does not indicate JSON (application/json, see is_json()), this returns None. Unlike Request.get_json(), the result is not cached. Parameters force (bool) – Ignore the mimetype and always try to parse JSON. silent (bool...
werkzeug.wrappers.index#werkzeug.wrappers.Response.get_json
get_wsgi_headers(environ) This is automatically called right before the response is started and returns headers modified for the given environment. It returns a copy of the headers from the response with some modifications applied if necessary. For example the location header (if present) is joined with the root URL ...
werkzeug.wrappers.index#werkzeug.wrappers.Response.get_wsgi_headers
get_wsgi_response(environ) Returns the final WSGI response as tuple. The first item in the tuple is the application iterator, the second the status and the third the list of headers. The response returned is created specially for the given environment. For example if the request method in the WSGI environment is 'HEA...
werkzeug.wrappers.index#werkzeug.wrappers.Response.get_wsgi_response
implicit_sequence_conversion = True if set to False accessing properties on the response object will not try to consume the response iterator and convert it into a list. Changelog New in version 0.6.2: That attribute was previously called implicit_seqence_conversion. (Notice the typo). If you did use this feature, y...
werkzeug.wrappers.index#werkzeug.wrappers.Response.implicit_sequence_conversion
iter_encoded() Iter the response encoded with the encoding of the response. If the response object is invoked as WSGI application the return value of this method is used as application iterator unless direct_passthrough was activated. Return type Iterator[bytes]
werkzeug.wrappers.index#werkzeug.wrappers.Response.iter_encoded
json_module = <module 'json' from '/home/docs/.pyenv/versions/3.7.9/lib/python3.7/json/__init__.py'> A module or other object that has dumps and loads functions that match the API of the built-in json module.
werkzeug.wrappers.index#werkzeug.wrappers.Response.json_module
last_modified The Last-Modified entity-header field indicates the date and time at which the origin server believes the variant was last modified. Changed in version 2.0: The datetime object is timezone-aware.
werkzeug.wrappers.index#werkzeug.wrappers.Response.last_modified
location The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource.
werkzeug.wrappers.index#werkzeug.wrappers.Response.location
make_conditional(request_or_environ, accept_ranges=False, complete_length=None) Make the response conditional to the request. This method works best if an etag was defined for the response already. The add_etag method can be used to do that. If called without etag just the date header is set. This does nothing if the...
werkzeug.wrappers.index#werkzeug.wrappers.Response.make_conditional
make_sequence() Converts the response iterator in a list. By default this happens automatically if required. If implicit_sequence_conversion is disabled, this method is not automatically called and some properties might raise exceptions. This also encodes all the items. Changelog New in version 0.6. Return type N...
werkzeug.wrappers.index#werkzeug.wrappers.Response.make_sequence
response: Union[Iterable[str], Iterable[bytes]] The response body to send as the WSGI iterable. A list of strings or bytes represents a fixed-length response, any other iterable is a streaming response. Strings are encoded to bytes as UTF-8. Do not set to a plain string or bytes, that will cause sending the response ...
werkzeug.wrappers.index#werkzeug.wrappers.Response.response
set_cookie(key, value='', max_age=None, expires=None, path='/', domain=None, secure=False, httponly=False, samesite=None) Sets a cookie. A warning is raised if the size of the cookie header exceeds max_cookie_size, but the header will still be set. Parameters key (str) – the key (name) of the cookie to be set. v...
werkzeug.wrappers.index#werkzeug.wrappers.Response.set_cookie
set_data(value) Sets a new string as response. The value must be a string or bytes. If a string is set it’s encoded to the charset of the response (utf-8 by default). Changelog New in version 0.9. Parameters value (Union[bytes, str]) – Return type None
werkzeug.wrappers.index#werkzeug.wrappers.Response.set_data
set_etag(etag, weak=False) Set the etag, and override the old one if there was one. Parameters etag (str) – weak (bool) – Return type None
werkzeug.wrappers.index#werkzeug.wrappers.Response.set_etag
_ensure_sequence(mutable=False) This method can be called by methods that need a sequence. If mutable is true, it will also ensure that the response sequence is a standard Python list. Changelog New in version 0.6. Parameters mutable (bool) – Return type None
werkzeug.wrappers.index#werkzeug.wrappers.Response._ensure_sequence
__call__(environ, start_response) Process this response as WSGI application. Parameters environ (WSGIEnvironment) – the WSGI environment. start_response (StartResponse) – the response callable provided by the WSGI server. Returns an application iterator Return type Iterable[bytes]
werkzeug.wrappers.index#werkzeug.wrappers.Response.__call__
class werkzeug.datastructures.ResponseCacheControl(values=(), on_update=None) A cache control for responses. Unlike RequestCacheControl this is mutable and gives access to response-relevant cache control headers. To get a header of the ResponseCacheControl object again you can convert the object into a string or call...
werkzeug.datastructures.index#werkzeug.datastructures.ResponseCacheControl
max_age accessor for ‘max-age’
werkzeug.datastructures.index#werkzeug.datastructures.ResponseCacheControl.max_age
no_cache accessor for ‘no-cache’
werkzeug.datastructures.index#werkzeug.datastructures.ResponseCacheControl.no_cache
no_store accessor for ‘no-store’
werkzeug.datastructures.index#werkzeug.datastructures.ResponseCacheControl.no_store
no_transform accessor for ‘no-transform’
werkzeug.datastructures.index#werkzeug.datastructures.ResponseCacheControl.no_transform
class werkzeug.routing.Rule(string, defaults=None, subdomain=None, methods=None, build_only=False, endpoint=None, strict_slashes=None, merge_slashes=None, redirect_to=None, alias=False, host=None, websocket=False) A Rule represents one URL pattern. There are some options for Rule that change the way it behaves and ar...
werkzeug.routing.index#werkzeug.routing.Rule
empty() Return an unbound copy of this rule. This can be useful if want to reuse an already bound URL for another map. See get_empty_kwargs to override what keyword arguments are provided to the new copy. Return type werkzeug.routing.Rule
werkzeug.routing.index#werkzeug.routing.Rule.empty
class werkzeug.routing.RuleFactory As soon as you have more complex URL setups it’s a good idea to use rule factories to avoid repetitive tasks. Some of them are builtin, others can be added by subclassing RuleFactory and overriding get_rules. get_rules(map) Subclasses of RuleFactory have to override this method ...
werkzeug.routing.index#werkzeug.routing.RuleFactory
get_rules(map) Subclasses of RuleFactory have to override this method and return an iterable of rules. Parameters map (werkzeug.routing.Map) – Return type Iterable[werkzeug.routing.Rule]
werkzeug.routing.index#werkzeug.routing.RuleFactory.get_rules
class werkzeug.routing.RuleTemplate(rules) Returns copies of the rules wrapped and expands string templates in the endpoint, rule, defaults or subdomain sections. Here a small example for such a rule template: from werkzeug.routing import Map, Rule, RuleTemplate resource = RuleTemplate([ Rule('/$name/', endpoint...
werkzeug.routing.index#werkzeug.routing.RuleTemplate
werkzeug.serving.run_simple(hostname, port, application, use_reloader=False, use_debugger=False, use_evalex=True, extra_files=None, exclude_patterns=None, reloader_interval=1, reloader_type='auto', threaded=False, processes=1, request_handler=None, static_files=None, passthrough_errors=False, ssl_context=None) Start ...
werkzeug.serving.index#werkzeug.serving.run_simple
werkzeug.test.run_wsgi_app(app, environ, buffered=False) Return a tuple in the form (app_iter, status, headers) of the application output. This works best if you pass it an application that returns an iterator all the time. Sometimes applications may use the write() callable returned by the start_response function. T...
werkzeug.test.index#werkzeug.test.run_wsgi_app
werkzeug.security.safe_join(directory, *pathnames) Safely join zero or more untrusted path components to a base directory to avoid escaping the base directory. Parameters directory (str) – The trusted base directory. pathnames (str) – The untrusted path components relative to the base directory. Returns A saf...
werkzeug.utils.index#werkzeug.security.safe_join
werkzeug.security.safe_str_cmp(a, b) This function compares strings in somewhat constant time. This requires that the length of at least one string is known in advance. Returns True if the two strings are equal, or False if they are not. Deprecated since version 2.0: Will be removed in Werkzeug 2.1. Use hmac.compare...
werkzeug.utils.index#werkzeug.security.safe_str_cmp
werkzeug.utils.secure_filename(filename) Pass it a filename and it will return a secure version of it. This filename can then safely be stored on a regular file system and passed to os.path.join(). The filename returned is an ASCII only string for maximum portability. On windows systems the function also makes sure t...
werkzeug.utils.index#werkzeug.utils.secure_filename
werkzeug.utils.send_file(path_or_file, environ, mimetype=None, as_attachment=False, download_name=None, conditional=True, etag=True, last_modified=None, max_age=None, use_x_sendfile=False, response_class=None, _root_path=None) Send the contents of a file to the client. The first argument can be a file path or a file-...
werkzeug.utils.index#werkzeug.utils.send_file
class werkzeug.middleware.shared_data.SharedDataMiddleware(app, exports, disallow=None, cache=True, cache_timeout=43200, fallback_mimetype='application/octet-stream') A WSGI middleware which provides static content for development environments or simple server setups. Its usage is quite simple: import os from werkzeu...
werkzeug.middleware.shared_data.index#werkzeug.middleware.shared_data.SharedDataMiddleware
is_allowed(filename) Subclasses can override this method to disallow the access to certain files. However by providing disallow in the constructor this method is overwritten. Parameters filename (str) – Return type bool
werkzeug.middleware.shared_data.index#werkzeug.middleware.shared_data.SharedDataMiddleware.is_allowed
class werkzeug.routing.Subdomain(subdomain, rules) All URLs provided by this factory have the subdomain set to a specific domain. For example if you want to use the subdomain for the current language this can be a good setup: url_map = Map([ Rule('/', endpoint='#select_language'), Subdomain('<string(length=2)...
werkzeug.routing.index#werkzeug.routing.Subdomain
class werkzeug.routing.Submount(path, rules) Like Subdomain but prefixes the URL rule with a given string: url_map = Map([ Rule('/', endpoint='index'), Submount('/blog', [ Rule('/', endpoint='blog/index'), Rule('/entry/<entry_slug>', endpoint='blog/show') ]) ]) Now the rule 'blog/show' ma...
werkzeug.routing.index#werkzeug.routing.Submount
class werkzeug.test.TestResponse(response, status, headers, request, history=(), **kwargs) Response subclass that provides extra information about requests made with the test Client. Test client requests will always return an instance of this class. If a custom response class is passed to the client, it is subclassed...
werkzeug.test.index#werkzeug.test.TestResponse
history: Tuple[werkzeug.test.TestResponse, ...] A list of intermediate responses. Populated when the test request is made with follow_redirects enabled.
werkzeug.test.index#werkzeug.test.TestResponse.history
request: werkzeug.wrappers.request.Request A request object with the environ used to make the request that resulted in this response.
werkzeug.test.index#werkzeug.test.TestResponse.request
werkzeug.testapp.test_app(environ, start_response) Simple test application that dumps the environment. You can use it to check if Werkzeug is working properly: >>> from werkzeug.serving import run_simple >>> from werkzeug.testapp import test_app >>> run_simple('localhost', 3000, test_app) * Running on http://localho...
werkzeug.wsgi.index#werkzeug.testapp.test_app
class werkzeug.datastructures.TypeConversionDict Works like a regular dict but the get() method can perform type conversions. MultiDict and CombinedMultiDict are subclasses of this class and provide the same feature. Changelog New in version 0.5. get(key, default=None, type=None) Return the default value if the...
werkzeug.datastructures.index#werkzeug.datastructures.TypeConversionDict
get(key, default=None, type=None) Return the default value if the requested data doesn’t exist. If type is provided and is a callable it should convert the value, return it or raise a ValueError if that is not possible. In this case the function will return the default as if the value was not found: >>> d = TypeConve...
werkzeug.datastructures.index#werkzeug.datastructures.TypeConversionDict.get
werkzeug.utils.unescape(s) The reverse of escape(). This unescapes all the HTML entities, not only those inserted by escape. Deprecated since version 2.0: Will be removed in Werkzeug 2.1. Use MarkupSafe instead. Parameters s (str) – Return type str
werkzeug.utils.index#werkzeug.utils.unescape
Unicode Werkzeug uses strings internally everwhere text data is assumed, even if the HTTP standard is not Unicode aware. Basically all incoming data is decoded from the charset (UTF-8 by default) so that you don’t work with bytes directly. Outgoing data is encoded into the target charset. Unicode in Python Imagine you...
werkzeug.unicode.index
class werkzeug.routing.UnicodeConverter(map, minlength=1, maxlength=None, length=None) This converter is the default converter and accepts any string but only one path segment. Thus the string can not include a slash. This is the default validator. Example: Rule('/pages/<page>'), Rule('/<string(length=2):lang_code>')...
werkzeug.routing.index#werkzeug.routing.UnicodeConverter
werkzeug.http.unquote_etag(etag) Unquote a single etag: >>> unquote_etag('W/"bar"') ('bar', True) >>> unquote_etag('"bar"') ('bar', False) Parameters etag (Optional[str]) – the etag identifier to unquote. Returns a (etag, weak) tuple. Return type Union[Tuple[str, bool], Tuple[None, None]]
werkzeug.http.index#werkzeug.http.unquote_etag
werkzeug.http.unquote_header_value(value, is_filename=False) Unquotes a header value. (Reversal of quote_header_value()). This does not use the real unquoting but what browsers are actually using for quoting. Changelog New in version 0.5. Parameters value (str) – the header value to unquote. is_filename (bool)...
werkzeug.http.index#werkzeug.http.unquote_header_value
werkzeug.urls.uri_to_iri(uri, charset='utf-8', errors='werkzeug.url_quote') Convert a URI to an IRI. All valid UTF-8 characters are unquoted, leaving all reserved and invalid characters quoted. If the URL has a domain, it is decoded from Punycode. >>> uri_to_iri("http://xn--n3h.net/p%C3%A5th?q=%C3%A8ry%DF") 'http://\...
werkzeug.urls.index#werkzeug.urls.uri_to_iri
class werkzeug.urls.URL(scheme, netloc, path, query, fragment) Represents a parsed URL. This behaves like a regular tuple but also has some extra attributes that give further insight into the URL. Create new instance of _URLTuple(scheme, netloc, path, query, fragment) Parameters scheme (str) – netloc (str) – ...
werkzeug.urls.index#werkzeug.urls.URL