MCPcopy Create free account

hub / github.com/pallets/werkzeug / functions

Functions2,000 in github.com/pallets/werkzeug

↓ 160 callersMethodget
Call :meth:`open` with ``method`` set to ``GET``.
src/werkzeug/test.py:1138
↓ 110 callersMethodjoin
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 callersMethodappend
(self, item)
src/werkzeug/datastructures.py:69
↓ 62 callersMethodbind
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 callersFunctionlist
(request, page)
examples/couchy/views.py:57
↓ 57 callersMethodmatch
( # type: ignore self, path_info: t.Optional[str] = None, method: t.Optional[str] = N
src/werkzeug/routing/map.py:467
↓ 53 callersMethodencode
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 callersFunctioncreate_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 callersMethoditems
(self, lower=False)
src/werkzeug/datastructures.py:993
↓ 42 callersMethodfrom_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 callersMethodbuild
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 callersFunctionis_immutable
(self)
src/werkzeug/datastructures.py:17
↓ 34 callersMethodadd
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 callersMethodpop
Remove the top item from the stack and return it. If the stack is empty, return ``None``.
src/werkzeug/local.py:147
↓ 29 callersMethodclose
(self)
tests/test_test.py:656
↓ 28 callersMethoddecode
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 callersMethodreplace
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 callersMethodupdate
Called before matching and building to keep the compiled rules in the correct order after things changed.
src/werkzeug/routing/map.py:355
↓ 23 callersMethodset
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 callersMethodgetlist
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 callersFunction_to_str
( # type: ignore x: None, charset: t.Optional[str] = ..., errors: str = ..., allow_none_chars
src/werkzeug/_internal.py:111
↓ 20 callersMethodto_header
Convert the etags set into a HTTP header string.
src/werkzeug/datastructures.py:2419
↓ 19 callersFunction_make_proxy
(value)
tests/test_local.py:219
↓ 19 callersMethodbind_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 callersMethodopen
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 callersFunctionredirect
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 callersMethodcopy
(self)
src/werkzeug/datastructures.py:1283
↓ 18 callersMethodextend
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 callersMethodget_data
( # type: ignore self, cache: bool = True, as_text: "te.Literal[False]" = False,
src/werkzeug/wrappers/request.py:365
↓ 18 callersFunctionsend_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 callersFunctionstart_response
(status, headers, exc_info=None)
src/werkzeug/test.py:1231
↓ 17 callersMethodread
(self, size)
tests/test_test.py:394
↓ 17 callersFunctionurl_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 callersMethodcompile
Compiles the regular expression and stores it.
src/werkzeug/routing/rules.py:675
↓ 16 callersMethodget
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 callersFunctionrun_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 callersFunctionrun_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 callersMethodrequest
(self, path="", **kwargs)
tests/conftest.py:66
↓ 13 callersMethodadd
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 callersMethodpop
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 callersFunctiondebug_repr
Creates a debug repr of an object as HTML string.
src/werkzeug/debug/repr.py:35
↓ 12 callersMethodon_update
(d: CallbackDict)
src/werkzeug/test.py:579
↓ 12 callersMethodwrite
(self, x: str)
src/werkzeug/debug/console.py:55
↓ 11 callersMethodclear
Clears all headers.
src/werkzeug/datastructures.py:1130
↓ 11 callersMethodmake_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 callersMethodto_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 callersMethodto_wsgi_list
Convert the headers into a list suitable for WSGI. :return: list
src/werkzeug/datastructures.py:1276
↓ 11 callersFunctionurl_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 callersFunctiondev_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 callersMethodget_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 callersMethodread
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 callersMethodsetdefault
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 callersMethodsetdefault
(self, key, factory)
examples/cupoftee/db.py:48
↓ 9 callersMethod__init__
(self, strong_etags=None, weak_etags=None, star_tag=False)
src/werkzeug/datastructures.py:2373
↓ 9 callersMethodbest_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 callersFunctiongenerate_template
Load and generate a template.
examples/simplewiki/utils.py:43
↓ 9 callersMethodget_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 callersMethoditems
(self, multi=1)
tests/test_datastructures.py:25
↓ 9 callersMethodremove
Remove a key. :param key: The key to be removed.
src/werkzeug/datastructures.py:1042
↓ 9 callersMethodset_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 callersFunction_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 callersMethod_write
(self, x: str)
src/werkzeug/debug/console.py:50
↓ 8 callersMethodclose
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 callersMethodget_data
(self, as_text: "te.Literal[False]" = False)
src/werkzeug/wrappers/response.py:294
↓ 8 callersMethoditer_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 callersMethodkeys
(self, multi=1)
tests/test_datastructures.py:19
↓ 8 callersMethodload
(cls, id)
examples/couchy/models.py:20
↓ 8 callersMethodpopitem
Removes a key or index and returns a (key, value) item.
src/werkzeug/datastructures.py:1071
↓ 8 callersMethodrender
Render the page text into a genshi stream.
examples/simplewiki/database.py:82
↓ 8 callersMethodvalues
Iterate over all values.
src/werkzeug/datastructures.py:1744
↓ 7 callersMethod__init__
( self, mapping: t.Optional[t.Dict[int, t.Type[HTTPException]]] = None, extra: t.Optio
src/werkzeug/exceptions.py:842
↓ 7 callersFunction_to_bytes
( x: t.Union[str, bytes], charset: str = _default_encoding, errors: str = "strict" )
src/werkzeug/_internal.py:95
↓ 7 callersFunctionapp
(request)
tests/test_test.py:175
↓ 7 callersMethodconnect
(self, **kwargs)
tests/conftest.py:49
↓ 7 callersMethodfind
Get the position of an entry or return -1. :param key: The key to be looked up.
src/werkzeug/datastructures.py:1734
↓ 7 callersMethodlists
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 callersMethodpost
Call :meth:`open` with ``method`` set to ``POST``.
src/werkzeug/test.py:1143
↓ 6 callersFunction_make_encode_wrapper
(reference: str)
src/werkzeug/_internal.py:62
↓ 6 callersMethoddiscard
Like :meth:`remove` but ignores errors. :param header: the header to be discarded.
src/werkzeug/datastructures.py:2276
↓ 6 callersMethodfrom_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 callersMethodget_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 callersMethodget_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 callersFunctionhref
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 callersFunctionhttp_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 callersMethodparse
Parses the information from the given stream, mimetype, content length and mimetype parameters. :param stream: an input stream
src/werkzeug/formparser.py:235
↓ 6 callersFunctionparse_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 callersMethodrun
Continually run the watch step, sleeping for the configured interval after each step.
src/werkzeug/_reloader.py:243
↓ 6 callersMethodsetlist
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 callersMethodsetlistdefault
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 callersMethodupdate
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 callersFunctionurl_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 callersFunctionurl_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 callersFunctionwrap_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 callersMethod__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 callersFunction_unicodify_header_value
(value)
src/werkzeug/datastructures.py:840
↓ 5 callersMethodadd
(self, key, value)
src/werkzeug/datastructures.py:761
↓ 5 callersMethodapp
(request)
tests/test_debug.py:225
↓ 5 callersMethodcontains
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 callersMethodempty
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 callersFunctionget_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