Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pallets/werkzeug
/ functions
Functions
2,000 in github.com/pallets/werkzeug
⨍
Functions
2,000
◇
Types & classes
303
↳
Endpoints
1
↓ 160 callers
Method
get
Call :meth:`open` with ``method`` set to ``GET``.
src/werkzeug/test.py:1138
↓ 110 callers
Method
join
Joins this URL with another one. This is just a convenience function for calling into :meth:`url_join` and then parsing the return va
src/werkzeug/urls.py:152
↓ 101 callers
Method
append
(self, item)
src/werkzeug/datastructures.py:69
↓ 62 callers
Method
bind
Return a new :class:`MapAdapter` with the details specified to the call. Note that `script_name` will default to ``'/'`` if not further
src/werkzeug/routing/map.py:180
↓ 60 callers
Function
list
(request, page)
examples/couchy/views.py:57
↓ 57 callers
Method
match
( # type: ignore self, path_info: t.Optional[str] = None, method: t.Optional[str] = N
src/werkzeug/routing/map.py:467
↓ 53 callers
Method
encode
Encodes the URL to a tuple made out of bytes. The charset is only being used for the path, query and fragment.
src/werkzeug/urls.py:342
↓ 52 callers
Function
create_environ
Create a new WSGI environ dict based on the values passed. The first parameter should be the path of the request which defaults to '/'. The
src/werkzeug/test.py:1182
↓ 43 callers
Method
items
(self, lower=False)
src/werkzeug/datastructures.py:993
↓ 42 callers
Method
from_values
Create a new request object based on the values provided. If environ is given missing values are filled from there. This method is u
src/werkzeug/wrappers/request.py:133
↓ 37 callers
Method
build
Assembles the relative url for that rule and the subdomain. If building doesn't work for some reasons `None` is returned. :internal:
src/werkzeug/routing/rules.py:816
↓ 37 callers
Function
is_immutable
(self)
src/werkzeug/datastructures.py:17
↓ 34 callers
Method
add
Add a new rule or factory to the map and bind it. Requires that the rule is not bound to another map. :param rulefactory: a :class:`
src/werkzeug/routing/map.py:167
↓ 31 callers
Method
pop
Remove the top item from the stack and return it. If the stack is empty, return ``None``.
src/werkzeug/local.py:147
↓ 29 callers
Method
close
(self)
tests/test_test.py:656
↓ 28 callers
Method
decode
Decodes the URL to a tuple made out of strings. The charset is only being used for the path, query and fragment.
src/werkzeug/urls.py:371
↓ 26 callers
Method
replace
Return an URL with the same values, except for those parameters given new values by whichever keyword arguments are specified.
src/werkzeug/urls.py:63
↓ 25 callers
Method
update
Called before matching and building to keep the compiled rules in the correct order after things changed.
src/werkzeug/routing/map.py:355
↓ 23 callers
Method
set
Remove all header tuples for `key` and add a new one. The newly added key either appears at the end of the list if there was no entry
src/werkzeug/datastructures.py:1134
↓ 22 callers
Method
getlist
Return the list of items for a given key. If that key is not in the :class:`Headers`, the return value will be an empty list. Just like
src/werkzeug/datastructures.py:955
↓ 21 callers
Function
_to_str
( # type: ignore x: None, charset: t.Optional[str] = ..., errors: str = ..., allow_none_chars
src/werkzeug/_internal.py:111
↓ 20 callers
Method
to_header
Convert the etags set into a HTTP header string.
src/werkzeug/datastructures.py:2419
↓ 19 callers
Function
_make_proxy
(value)
tests/test_local.py:219
↓ 19 callers
Method
bind_to_environ
Like :meth:`bind` but you can pass it an WSGI environment and it will fetch the information from that dictionary. Note that because of
src/werkzeug/routing/map.py:246
↓ 19 callers
Method
open
Generate an environ dict from the given arguments, make a request to the application using it, and return the response. :param args:
src/werkzeug/test.py:1032
↓ 19 callers
Function
redirect
Returns a response object (a WSGI application) that, if called, redirects the client to the target location. Supported codes are 301, 302, 303
src/werkzeug/utils.py:244
↓ 18 callers
Method
copy
(self)
src/werkzeug/datastructures.py:1283
↓ 18 callers
Method
extend
Extend headers in this object with items from another object containing header items as well as keyword arguments. To replace existin
src/werkzeug/datastructures.py:1007
↓ 18 callers
Method
get_data
( # type: ignore self, cache: bool = True, as_text: "te.Literal[False]" = False,
src/werkzeug/wrappers/request.py:365
↓ 18 callers
Function
send_file
Send the contents of a file to the client. The first argument can be a file path or a file-like object. Paths are preferred in most cases bec
src/werkzeug/utils.py:329
↓ 18 callers
Function
start_response
(status, headers, exc_info=None)
src/werkzeug/test.py:1231
↓ 17 callers
Method
read
(self, size)
tests/test_test.py:394
↓ 17 callers
Function
url_parse
Parses a URL from a string into a :class:`URL` tuple. If the URL is lacking a scheme it can be provided as second argument. Otherwise, it is
src/werkzeug/urls.py:457
↓ 16 callers
Method
compile
Compiles the regular expression and stores it.
src/werkzeug/routing/rules.py:675
↓ 16 callers
Method
get
Return the default value if the requested data doesn't exist. If `type` is provided and is a callable it should convert the value, ret
src/werkzeug/datastructures.py:919
↓ 15 callers
Function
run_simple
Start a development server for a WSGI application. Various optional features can be enabled. .. warning:: Do not use the development
src/werkzeug/serving.py:907
↓ 15 callers
Function
run_wsgi_app
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
src/werkzeug/test.py:1205
↓ 14 callers
Method
request
(self, path="", **kwargs)
tests/conftest.py:66
↓ 13 callers
Method
add
Add a new header tuple to the list. Keyword arguments can specify additional parameters for the header value, with underscores conver
src/werkzeug/datastructures.py:1090
↓ 13 callers
Method
pop
Removes and returns a key or index. :param key: The key to be popped. If this is an integer the item at that position is
src/werkzeug/datastructures.py:1049
↓ 12 callers
Function
debug_repr
Creates a debug repr of an object as HTML string.
src/werkzeug/debug/repr.py:35
↓ 12 callers
Method
on_update
(d: CallbackDict)
src/werkzeug/test.py:579
↓ 12 callers
Method
write
(self, x: str)
src/werkzeug/debug/console.py:55
↓ 11 callers
Method
clear
Clears all headers.
src/werkzeug/datastructures.py:1130
↓ 11 callers
Method
make_conditional
Make the response conditional to the request. This method works best if an etag was defined for the response already. The `add_etag`
src/werkzeug/wrappers/response.py:757
↓ 11 callers
Method
to_dict
Return the contents as regular dict. If `flat` is `True` the returned dict will only have the first item present, if `flat` is `False
src/werkzeug/datastructures.py:520
↓ 11 callers
Method
to_wsgi_list
Convert the headers into a list suitable for WSGI. :return: list
src/werkzeug/datastructures.py:1276
↓ 11 callers
Function
url_quote
URL encode a single string with a given encoding. :param s: the string to quote. :param charset: the charset to be used. :param safe: an
src/werkzeug/urls.py:547
↓ 10 callers
Function
dev_server
A function that will start a dev server in an external process and return a client for interacting with the server.
tests/conftest.py:95
↓ 10 callers
Method
get_wsgi_headers
This is automatically called right before the response is started and returns headers modified for the given environment. It returns a
src/werkzeug/wrappers/response.py:478
↓ 10 callers
Method
read
Read up to ``size`` bytes from the underlying stream. If size is not provided, read until the limit. If the limit is reached, :meth:`
src/werkzeug/wsgi.py:960
↓ 10 callers
Method
setdefault
Return the first value for the key if it is in the headers, otherwise set the header to the value given by ``default`` and return that
src/werkzeug/datastructures.py:1186
↓ 10 callers
Method
setdefault
(self, key, factory)
examples/cupoftee/db.py:48
↓ 9 callers
Method
__init__
(self, strong_etags=None, weak_etags=None, star_tag=False)
src/werkzeug/datastructures.py:2373
↓ 9 callers
Method
best_match
Returns the best match from a list of possible matches based on the specificity and quality of the client. If two items have the same
src/werkzeug/datastructures.py:1768
↓ 9 callers
Function
generate_template
Load and generate a template.
examples/simplewiki/utils.py:43
↓ 9 callers
Method
get_environ
Return the built environ. .. versionchanged:: 0.15 The content type and length headers are set based on input stream
src/werkzeug/test.py:737
↓ 9 callers
Method
items
(self, multi=1)
tests/test_datastructures.py:25
↓ 9 callers
Method
remove
Remove a key. :param key: The key to be removed.
src/werkzeug/datastructures.py:1042
↓ 9 callers
Method
set_cookie
Sets a cookie. A warning is raised if the size of the cookie header exceeds :attr:`max_cookie_size`, but the header will still be set
src/werkzeug/sansio/response.py:192
↓ 8 callers
Function
_log
Log a message to the 'werkzeug' logger. The logger is created the first time it is needed. If there is no level set, it is set to :data:`logg
src/werkzeug/_internal.py:205
↓ 8 callers
Method
_write
(self, x: str)
src/werkzeug/debug/console.py:50
↓ 8 callers
Method
close
Closes all files. If you put real :class:`file` objects into the :attr:`files` dict you can call this method to automatically close t
src/werkzeug/test.py:719
↓ 8 callers
Method
get_data
(self, as_text: "te.Literal[False]" = False)
src/werkzeug/wrappers/response.py:294
↓ 8 callers
Method
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
src/werkzeug/wrappers/response.py:395
↓ 8 callers
Method
keys
(self, multi=1)
tests/test_datastructures.py:19
↓ 8 callers
Method
load
(cls, id)
examples/couchy/models.py:20
↓ 8 callers
Method
popitem
Removes a key or index and returns a (key, value) item.
src/werkzeug/datastructures.py:1071
↓ 8 callers
Method
render
Render the page text into a genshi stream.
examples/simplewiki/database.py:82
↓ 8 callers
Method
values
Iterate over all values.
src/werkzeug/datastructures.py:1744
↓ 7 callers
Method
__init__
( self, mapping: t.Optional[t.Dict[int, t.Type[HTTPException]]] = None, extra: t.Optio
src/werkzeug/exceptions.py:842
↓ 7 callers
Function
_to_bytes
( x: t.Union[str, bytes], charset: str = _default_encoding, errors: str = "strict" )
src/werkzeug/_internal.py:95
↓ 7 callers
Function
app
(request)
tests/test_test.py:175
↓ 7 callers
Method
connect
(self, **kwargs)
tests/conftest.py:49
↓ 7 callers
Method
find
Get the position of an entry or return -1. :param key: The key to be looked up.
src/werkzeug/datastructures.py:1734
↓ 7 callers
Method
lists
Return a iterator of ``(key, values)`` pairs, where values is the list of all values associated with the key.
src/werkzeug/datastructures.py:491
↓ 7 callers
Method
post
Call :meth:`open` with ``method`` set to ``POST``.
src/werkzeug/test.py:1143
↓ 6 callers
Function
_make_encode_wrapper
(reference: str)
src/werkzeug/_internal.py:62
↓ 6 callers
Method
discard
Like :meth:`remove` but ignores errors. :param header: the header to be discarded.
src/werkzeug/datastructures.py:2276
↓ 6 callers
Method
from_app
Create a new response object from an application output. This works best if you pass it an application that returns a generator all t
src/werkzeug/wrappers/response.py:274
↓ 6 callers
Method
get_host
Figures out the full host name for the given domain part. The domain part is a subdomain in case host matching is disabled or a full
src/werkzeug/routing/map.py:693
↓ 6 callers
Method
get_request
Returns a request with the data. If the request class is not specified :attr:`request_class` is used. :param cls: The request wrappe
src/werkzeug/test.py:825
↓ 6 callers
Function
href
Simple function for URL generation. Position arguments are used for the URL path and keyword arguments are used for the url parameters.
examples/simplewiki/utils.py:54
↓ 6 callers
Function
http_date
Format a datetime object or timestamp into an :rfc:`2822` date string. This is a wrapper for :func:`email.utils.format_datetime`. It assu
src/werkzeug/http.py:960
↓ 6 callers
Method
parse
Parses the information from the given stream, mimetype, content length and mimetype parameters. :param stream: an input stream
src/werkzeug/formparser.py:235
↓ 6 callers
Function
parse_options_header
Parse a ``Content-Type``-like header into a tuple with the value and any options: >>> parse_options_header('text/html; charset=utf8') ('t
src/werkzeug/http.py:390
↓ 6 callers
Method
run
Continually run the watch step, sleeping for the configured interval after each step.
src/werkzeug/_reloader.py:243
↓ 6 callers
Method
setlist
Remove any existing values for a header and add new ones. :param key: The header key to set. :param values: An iterable of values to
src/werkzeug/datastructures.py:1169
↓ 6 callers
Method
setlistdefault
Return the list of values for the key if it is in the headers, otherwise set the header to the list of values given by ``default`` and
src/werkzeug/datastructures.py:1201
↓ 6 callers
Method
update
Replace headers in this object with items from another headers object and keyword arguments. To extend existing keys instead of repla
src/werkzeug/datastructures.py:1238
↓ 6 callers
Function
url_unparse
The reverse operation to :meth:`url_parse`. This accepts arbitrary as well as :class:`URL` tuples and returns a URL as a string. :param comp
src/werkzeug/urls.py:595
↓ 6 callers
Function
url_unquote
URL decode a single string with a given encoding. If the charset is set to `None` no decoding is performed and raw bytes are returned. :
src/werkzeug/urls.py:626
↓ 6 callers
Function
wrap_file
Wraps a file. This uses the WSGI server's file wrapper if available or otherwise the generic :class:`FileWrapper`. .. versionadded:: 0.5
src/werkzeug/wsgi.py:507
↓ 5 callers
Method
__getitem__
Besides index lookup (getting item n) you can also pass it a string to get the quality for the item. If the item is not in the list, the
src/werkzeug/datastructures.py:1687
↓ 5 callers
Function
_unicodify_header_value
(value)
src/werkzeug/datastructures.py:840
↓ 5 callers
Method
add
(self, key, value)
src/werkzeug/datastructures.py:761
↓ 5 callers
Method
app
(request)
tests/test_debug.py:225
↓ 5 callers
Method
contains
Check if an etag is part of the set ignoring weak tags. It is also possible to use the ``in`` operator.
src/werkzeug/datastructures.py:2402
↓ 5 callers
Method
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_em
src/werkzeug/routing/rules.py:497
↓ 5 callers
Function
get_current_url
Recreate the URL for a request. If an optional part isn't provided, it and subsequent parts are not included in the URL. The URL is an IRI, n
src/werkzeug/sansio/utils.py:104
next →
1–100 of 2,000, ranked by callers