doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
torch.vstack(tensors, *, out=None) β Tensor
Stack tensors in sequence vertically (row wise). This is equivalent to concatenation along the first axis after all 1-D tensors have been reshaped by torch.atleast_2d(). Parameters
tensors (sequence of Tensors) β sequence of tensors to concatenate Keyword Arguments
out ... | torch.generated.torch.vstack#torch.vstack |
torch.where(condition, x, y) β Tensor
Return a tensor of elements selected from either x or y, depending on condition. The operation is defined as: outi={xiif conditioniyiotherwise\text{out}_i = \begin{cases} \text{x}_i & \text{if } \text{condition}_i \\ \text{y}_i & \text{otherwise} \\ \end{cases}
Note The tenso... | torch.generated.torch.where#torch.where |
torch.xlogy(input, other, *, out=None) β Tensor
Computes input * log(other) with the following cases. outi={NaNif otheri=NaN0if inputi=0.0inputiβlogβ‘(otheri)otherwise\text{out}_{i} = \begin{cases} \text{NaN} & \text{if } \text{other}_{i} = \text{NaN} \\ 0 & \text{if } \text{input}_{i} = 0.0 \\ \text{input}_{i} * \lo... | torch.generated.torch.xlogy#torch.xlogy |
torch.zeros(*size, *, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False) β Tensor
Returns a tensor filled with the scalar value 0, with the shape defined by the variable argument size. Parameters
size (int...) β a sequence of integers defining the shape of the output tensor. Can be a vari... | torch.generated.torch.zeros#torch.zeros |
torch.zeros_like(input, *, dtype=None, layout=None, device=None, requires_grad=False, memory_format=torch.preserve_format) β Tensor
Returns a tensor filled with the scalar value 0, with the same size as input. torch.zeros_like(input) is equivalent to torch.zeros(input.size(), dtype=input.dtype, layout=input.layout, d... | torch.generated.torch.zeros_like#torch.zeros_like |
torch._assert(condition, message) [source]
A wrapper around Pythonβs assert which is symbolically traceable. | torch.generated.torch._assert#torch._assert |
werkzeug.exceptions.abort(status, *args, **kwargs)
Raises an HTTPException for the given status code or WSGI application. If a status code is given, it will be looked up in the list of exceptions and will raise that exception. If passed a WSGI application, it will wrap it in a proxy WSGI exception and raise that: abo... | werkzeug.exceptions.index#werkzeug.exceptions.abort |
class werkzeug.exceptions.Aborter(mapping=None, extra=None)
When passed a dict of code -> exception items it can be used as callable that raises exceptions. If the first argument to the callable is an integer it will be looked up in the mapping, if itβs a WSGI application it will be raised in a proxy exception. The r... | werkzeug.exceptions.index#werkzeug.exceptions.Aborter |
class werkzeug.datastructures.Accept(values=())
An Accept object is just a list subclass for lists of (value, quality) tuples. It is automatically sorted by specificity and quality. All Accept objects work similar to a list but provide extra functionality for working with the data. Containment checks are normalized t... | werkzeug.datastructures.index#werkzeug.datastructures.Accept |
best_match(matches, default=None)
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 quality and specificity, the one is returned that comes first. Parameters
matches β a list of matches to check for
default β the value that is re... | werkzeug.datastructures.index#werkzeug.datastructures.Accept.best_match |
find(key)
Get the position of an entry or return -1. Parameters
key β The key to be looked up. | werkzeug.datastructures.index#werkzeug.datastructures.Accept.find |
index(key)
Get the position of an entry or raise ValueError. Parameters
key β The key to be looked up. Changelog Changed in version 0.5: This used to raise IndexError, which was inconsistent with the list API. | werkzeug.datastructures.index#werkzeug.datastructures.Accept.index |
quality(key)
Returns the quality of the key. Changelog New in version 0.6: In previous versions you had to use the item-lookup syntax (eg: obj[key] instead of obj.quality(key)) | werkzeug.datastructures.index#werkzeug.datastructures.Accept.quality |
to_header()
Convert the header set into an HTTP header string. | werkzeug.datastructures.index#werkzeug.datastructures.Accept.to_header |
values()
Iterate over all values. | werkzeug.datastructures.index#werkzeug.datastructures.Accept.values |
class werkzeug.routing.AnyConverter(map, *items)
Matches one of the items provided. Items can either be Python identifiers or strings: Rule('/<any(about, help, imprint, class, "foo,bar"):page_name>')
Parameters
map (Map) β the Map.
items (str) β this function accepts the possible items as positional arguments. ... | werkzeug.routing.index#werkzeug.routing.AnyConverter |
werkzeug.utils.append_slash_redirect(environ, code=301)
Redirects to the same URL but with a slash appended. The behavior of this function is undefined if the path ends with a slash already. Parameters
environ (WSGIEnvironment) β the WSGI environment for the request that triggers the redirect.
code (int) β the s... | werkzeug.utils.index#werkzeug.utils.append_slash_redirect |
class werkzeug.datastructures.Authorization(auth_type, data=None)
Represents an Authorization header sent by the client. This is returned by parse_authorization_header(). It can be useful to create the object manually to pass to the test Client. Changelog Changed in version 0.5: This object became immutable.
prop... | werkzeug.datastructures.index#werkzeug.datastructures.Authorization |
to_header()
Convert to a string value for an Authorization header. New in version 2.0: Added to support passing authorization to the test client. | werkzeug.datastructures.index#werkzeug.datastructures.Authorization.to_header |
class werkzeug.urls.BaseURL(scheme, netloc, path, query, fragment)
Superclass of URL and BytesURL. Create new instance of _URLTuple(scheme, netloc, path, query, fragment) Parameters
scheme (str) β
netloc (str) β
path (str) β
query (str) β
fragment (str) β
property ascii_host: Optional[str]
Works e... | werkzeug.urls.index#werkzeug.urls.BaseURL |
decode_netloc()
Decodes the netloc part into a string. Return type
str | werkzeug.urls.index#werkzeug.urls.BaseURL.decode_netloc |
decode_query(*args, **kwargs)
Decodes the query part of the URL. Ths is a shortcut for calling url_decode() on the query argument. The arguments and keyword arguments are forwarded to url_decode() unchanged. Parameters
args (Any) β
kwargs (Any) β Return type
ds.MultiDict[str, str] | werkzeug.urls.index#werkzeug.urls.BaseURL.decode_query |
encode_netloc()
Encodes the netloc part to an ASCII safe URL as bytes. Return type
str | werkzeug.urls.index#werkzeug.urls.BaseURL.encode_netloc |
get_file_location(pathformat=None)
Returns a tuple with the location of the file in the form (server, location). If the netloc is empty in the URL or points to localhost, itβs represented as None. The pathformat by default is autodetection but needs to be set when working with URLs of a specific system. The supported... | werkzeug.urls.index#werkzeug.urls.BaseURL.get_file_location |
join(*args, **kwargs)
Joins this URL with another one. This is just a convenience function for calling into url_join() and then parsing the return value again. Parameters
args (Any) β
kwargs (Any) β Return type
werkzeug.urls.BaseURL | werkzeug.urls.index#werkzeug.urls.BaseURL.join |
replace(**kwargs)
Return an URL with the same values, except for those parameters given new values by whichever keyword arguments are specified. Parameters
kwargs (Any) β Return type
werkzeug.urls.BaseURL | werkzeug.urls.index#werkzeug.urls.BaseURL.replace |
to_iri_tuple()
Returns a URL tuple that holds a IRI. This will try to decode as much information as possible in the URL without losing information similar to how a web browser does it for the URL bar. Itβs usually more interesting to directly call uri_to_iri() which will return a string. Return type
werkzeug.urls.B... | werkzeug.urls.index#werkzeug.urls.BaseURL.to_iri_tuple |
to_uri_tuple()
Returns a BytesURL tuple that holds a URI. This will encode all the information in the URL properly to ASCII using the rules a web browser would follow. Itβs usually more interesting to directly call iri_to_uri() which will return a string. Return type
werkzeug.urls.BaseURL | werkzeug.urls.index#werkzeug.urls.BaseURL.to_uri_tuple |
to_url()
Returns a URL string or bytes depending on the type of the information stored. This is just a convenience function for calling url_unparse() for this URL. Return type
str | werkzeug.urls.index#werkzeug.urls.BaseURL.to_url |
werkzeug.utils.bind_arguments(func, args, kwargs)
Bind the arguments provided into a dict. When passed a function, a tuple of arguments and a dict of keyword arguments bind_arguments returns a dict of names as the function would see it. This can be useful to implement a cache decorator that uses the function argument... | werkzeug.utils.index#werkzeug.utils.bind_arguments |
class werkzeug.filesystem.BrokenFilesystemWarning
The warning used by Werkzeug to signal a broken filesystem. Will only be used once per runtime. | werkzeug.filesystem.index#werkzeug.filesystem.BrokenFilesystemWarning |
class werkzeug.urls.BytesURL(scheme, netloc, path, query, fragment)
Represents a parsed URL in bytes. Create new instance of _URLTuple(scheme, netloc, path, query, fragment) Parameters
scheme (str) β
netloc (str) β
path (str) β
query (str) β
fragment (str) β
decode(charset='utf-8', errors='replace')... | werkzeug.urls.index#werkzeug.urls.BytesURL |
decode(charset='utf-8', errors='replace')
Decodes the URL to a tuple made out of strings. The charset is only being used for the path, query and fragment. Parameters
charset (str) β
errors (str) β Return type
werkzeug.urls.URL | werkzeug.urls.index#werkzeug.urls.BytesURL.decode |
encode_netloc()
Returns the netloc unchanged as bytes. Return type
bytes | werkzeug.urls.index#werkzeug.urls.BytesURL.encode_netloc |
class werkzeug.utils.cached_property(fget, name=None, doc=None)
A property() that is only evaluated once. Subsequent access returns the cached value. Setting the property sets the cached value. Deleting the property clears the cached value, accessing it again will evaluate it again. class Example:
@cached_propert... | werkzeug.utils.index#werkzeug.utils.cached_property |
CGI If all other deployment methods do not work, CGI will work for sure. CGI is supported by all major servers but usually has a less-than-optimal performance. This is also the way you can use a Werkzeug application on Googleβs AppEngine, there however the execution does happen in a CGI-like environment. The applicatio... | werkzeug.deployment.cgi.index |
class werkzeug.datastructures.CharsetAccept(values=())
Like Accept but with normalization for charsets. | werkzeug.datastructures.index#werkzeug.datastructures.CharsetAccept |
werkzeug.security.check_password_hash(pwhash, password)
Check a password against a given salted and hashed password value. In order to support unsalted legacy passwords this method supports plain text passwords, md5 and sha1 hashes (both salted and unsalted). Returns True if the password matched, False otherwise. Pa... | werkzeug.utils.index#werkzeug.security.check_password_hash |
class werkzeug.test.Client(application, response_wrapper=None, use_cookies=True, allow_subdomain_redirects=False)
This class allows you to send requests to a wrapped application. The use_cookies parameter indicates whether cookies should be stored and sent for subsequent requests. This is True by default, but passing... | werkzeug.test.index#werkzeug.test.Client |
delete(*args, **kw)
Call open() with method set to DELETE. Parameters
args (Any) β
kw (Any) β Return type
werkzeug.test.TestResponse | werkzeug.test.index#werkzeug.test.Client.delete |
delete_cookie(server_name, key, path='/', domain=None, secure=False, httponly=False, samesite=None)
Deletes a cookie in the test client. Parameters
server_name (str) β
key (str) β
path (str) β
domain (Optional[str]) β
secure (bool) β
httponly (bool) β
samesite (Optional[str]) β Return type
None | werkzeug.test.index#werkzeug.test.Client.delete_cookie |
get(*args, **kw)
Call open() with method set to GET. Parameters
args (Any) β
kw (Any) β Return type
werkzeug.test.TestResponse | werkzeug.test.index#werkzeug.test.Client.get |
head(*args, **kw)
Call open() with method set to HEAD. Parameters
args (Any) β
kw (Any) β Return type
werkzeug.test.TestResponse | werkzeug.test.index#werkzeug.test.Client.head |
open(*args, as_tuple=False, buffered=False, follow_redirects=False, **kwargs)
Generate an environ dict from the given arguments, make a request to the application using it, and return the response. Parameters
args (Any) β Passed to EnvironBuilder to create the environ for the request. If a single arg is passed, i... | werkzeug.test.index#werkzeug.test.Client.open |
options(*args, **kw)
Call open() with method set to OPTIONS. Parameters
args (Any) β
kw (Any) β Return type
werkzeug.test.TestResponse | werkzeug.test.index#werkzeug.test.Client.options |
patch(*args, **kw)
Call open() with method set to PATCH. Parameters
args (Any) β
kw (Any) β Return type
werkzeug.test.TestResponse | werkzeug.test.index#werkzeug.test.Client.patch |
post(*args, **kw)
Call open() with method set to POST. Parameters
args (Any) β
kw (Any) β Return type
werkzeug.test.TestResponse | werkzeug.test.index#werkzeug.test.Client.post |
put(*args, **kw)
Call open() with method set to PUT. Parameters
args (Any) β
kw (Any) β Return type
werkzeug.test.TestResponse | werkzeug.test.index#werkzeug.test.Client.put |
set_cookie(server_name, key, value='', max_age=None, expires=None, path='/', domain=None, secure=False, httponly=False, samesite=None, charset='utf-8')
Sets a cookie in the clientβs cookie jar. The server name is required and has to match the one that is also passed to the open call. Parameters
server_name (str) ... | werkzeug.test.index#werkzeug.test.Client.set_cookie |
trace(*args, **kw)
Call open() with method set to TRACE. Parameters
args (Any) β
kw (Any) β Return type
werkzeug.test.TestResponse | werkzeug.test.index#werkzeug.test.Client.trace |
class werkzeug.wsgi.ClosingIterator(iterable, callbacks=None)
The WSGI specification requires that all middlewares and gateways respect the close callback of the iterable returned by the application. Because it is useful to add another close action to a returned iterable and adding a custom iterable is a boring task ... | werkzeug.wsgi.index#werkzeug.wsgi.ClosingIterator |
class werkzeug.datastructures.CombinedMultiDict(dicts=None)
A read only MultiDict that you can pass multiple MultiDict instances as sequence and it will combine the return values of all wrapped dicts: >>> from werkzeug.datastructures import CombinedMultiDict, MultiDict
>>> post = MultiDict([('foo', 'bar')])
>>> get =... | werkzeug.datastructures.index#werkzeug.datastructures.CombinedMultiDict |
class werkzeug.datastructures.ContentRange(units, start, stop, length=None, on_update=None)
Represents the content range header. Changelog New in version 0.7.
property length
The length of the range or None.
set(start, stop, length=None, units='bytes')
Simple method to update the ranges.
property star... | werkzeug.datastructures.index#werkzeug.datastructures.ContentRange |
set(start, stop, length=None, units='bytes')
Simple method to update the ranges. | werkzeug.datastructures.index#werkzeug.datastructures.ContentRange.set |
unset()
Sets the units to None which indicates that the header should no longer be used. | werkzeug.datastructures.index#werkzeug.datastructures.ContentRange.unset |
werkzeug.http.cookie_date(expires=None)
Format a datetime object or timestamp into an RFC 2822 date string for Set-Cookie expires. Deprecated since version 2.0: Will be removed in Werkzeug 2.1. Use http_date() instead. Parameters
expires (Optional[Union[datetime.datetime, datetime.date, int, float, time.struct_ti... | werkzeug.http.index#werkzeug.http.cookie_date |
werkzeug.test.create_environ(*args, **kwargs)
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 second one can either be an absolute path (in that case the host is localhost:80) or a full path to the request with scheme, netloc ... | werkzeug.test.index#werkzeug.test.create_environ |
class werkzeug.debug.DebuggedApplication(app, evalex=False, request_key='werkzeug.request', console_path='/console', console_init_func=None, show_hidden_frames=False, pin_security=True, pin_logging=True)
Enables debugging support for a given application: from werkzeug.debug import DebuggedApplication
from myapp impor... | werkzeug.debug.index#werkzeug.debug.DebuggedApplication |
class werkzeug.middleware.dispatcher.DispatcherMiddleware(app, mounts=None)
Combine multiple applications as a single WSGI application. Requests are dispatched to an application based on the path it is mounted under. Parameters
app (WSGIApplication) β The WSGI application to dispatch to if the request doesnβt mat... | werkzeug.middleware.dispatcher.index#werkzeug.middleware.dispatcher.DispatcherMiddleware |
werkzeug.http.dump_cookie(key, value='', max_age=None, expires=None, path='/', domain=None, secure=False, httponly=False, charset='utf-8', sync_expires=True, max_size=4093, samesite=None)
Create a Set-Cookie header without the Set-Cookie prefix. The return value is usually restricted to ascii as the vast majority of ... | werkzeug.http.index#werkzeug.http.dump_cookie |
werkzeug.http.dump_header(iterable, allow_token=True)
Dump an HTTP header again. This is the reversal of parse_list_header(), parse_set_header() and parse_dict_header(). This also quotes strings that include an equals sign unless you pass it as dict of key, value pairs. >>> dump_header({'foo': 'bar baz'})
'foo="bar b... | werkzeug.http.index#werkzeug.http.dump_header |
class werkzeug.routing.EndpointPrefix(prefix, rules)
Prefixes all endpoints (which must be strings for this factory) with another string. This can be useful for sub applications: url_map = Map([
Rule('/', endpoint='index'),
EndpointPrefix('blog/', [Submount('/blog', [
Rule('/', endpoint='index'),
... | werkzeug.routing.index#werkzeug.routing.EndpointPrefix |
class werkzeug.test.EnvironBuilder(path='/', base_url=None, query_string=None, method='GET', input_stream=None, content_type=None, content_length=None, errors_stream=None, multithread=False, multiprocess=False, run_once=False, headers=None, data=None, environ_base=None, environ_overrides=None, charset='utf-8', mimetype... | werkzeug.test.index#werkzeug.test.EnvironBuilder |
close()
Closes all files. If you put real file objects into the files dict you can call this method to automatically close them all in one go. Return type
None | werkzeug.test.index#werkzeug.test.EnvironBuilder.close |
classmethod from_environ(environ, **kwargs)
Turn an environ dict back into a builder. Any extra kwargs override the args extracted from the environ. Changed in version 2.0: Path and query values are passed through the WSGI decoding dance to avoid double encoding. Changelog New in version 0.15. Parameters
envi... | werkzeug.test.index#werkzeug.test.EnvironBuilder.from_environ |
get_environ()
Return the built environ. Changelog Changed in version 0.15: The content type and length headers are set based on input stream detection. Previously this only set the WSGI keys. Return type
WSGIEnvironment | werkzeug.test.index#werkzeug.test.EnvironBuilder.get_environ |
get_request(cls=None)
Returns a request with the data. If the request class is not specified request_class is used. Parameters
cls (Optional[Type[werkzeug.wrappers.request.Request]]) β The request wrapper to use. Return type
werkzeug.wrappers.request.Request | werkzeug.test.index#werkzeug.test.EnvironBuilder.get_request |
static json_dumps(obj, *, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, cls=None, indent=None, separators=None, default=None, sort_keys=False, **kw)
The serialization function used when json is passed. | werkzeug.test.index#werkzeug.test.EnvironBuilder.json_dumps |
request_class
alias of werkzeug.wrappers.request.Request | werkzeug.test.index#werkzeug.test.EnvironBuilder.request_class |
server_protocol = 'HTTP/1.1'
the server protocol to use. defaults to HTTP/1.1 | werkzeug.test.index#werkzeug.test.EnvironBuilder.server_protocol |
wsgi_version = (1, 0)
the wsgi version to use. defaults to (1, 0) | werkzeug.test.index#werkzeug.test.EnvironBuilder.wsgi_version |
class werkzeug.datastructures.EnvironHeaders(environ)
Read only version of the headers from a WSGI environment. This provides the same interface as Headers and is constructed from a WSGI environment. From Werkzeug 0.3 onwards, the KeyError raised by this class is also a subclass of the BadRequest HTTP exception and w... | werkzeug.datastructures.index#werkzeug.datastructures.EnvironHeaders |
class werkzeug.utils.environ_property(name, default=None, load_func=None, dump_func=None, read_only=None, doc=None)
Maps request attributes to environment variables. This works not only for the Werkzeug request object, but also any other class with an environ attribute: >>> class Test(object):
... environ = {'key... | werkzeug.utils.index#werkzeug.utils.environ_property |
werkzeug.utils.escape(s)
Replace &, <, >, ", and ' with HTML-safe sequences. None is escaped to an empty string. Deprecated since version 2.0: Will be removed in Werkzeug 2.1. Use MarkupSafe instead. Parameters
s (Any) β Return type
str | werkzeug.utils.index#werkzeug.utils.escape |
class werkzeug.datastructures.ETags(strong_etags=None, weak_etags=None, star_tag=False)
A set that can be used to check if one etag is present in a collection of etags.
as_set(include_weak=False)
Convert the ETags object into a python set. Per default all the weak etags are not part of this set.
contains(etag... | werkzeug.datastructures.index#werkzeug.datastructures.ETags |
as_set(include_weak=False)
Convert the ETags object into a python set. Per default all the weak etags are not part of this set. | werkzeug.datastructures.index#werkzeug.datastructures.ETags.as_set |
contains(etag)
Check if an etag is part of the set ignoring weak tags. It is also possible to use the in operator. | werkzeug.datastructures.index#werkzeug.datastructures.ETags.contains |
contains_raw(etag)
When passed a quoted tag it will check if this tag is part of the set. If the tag is weak it is checked against weak and strong tags, otherwise strong only. | werkzeug.datastructures.index#werkzeug.datastructures.ETags.contains_raw |
contains_weak(etag)
Check if an etag is part of the set including weak and strong tags. | werkzeug.datastructures.index#werkzeug.datastructures.ETags.contains_weak |
is_strong(etag)
Check if an etag is strong. | werkzeug.datastructures.index#werkzeug.datastructures.ETags.is_strong |
is_weak(etag)
Check if an etag is weak. | werkzeug.datastructures.index#werkzeug.datastructures.ETags.is_weak |
to_header()
Convert the etags set into a HTTP header string. | werkzeug.datastructures.index#werkzeug.datastructures.ETags.to_header |
werkzeug.wsgi.extract_path_info(environ_or_baseurl, path_or_url, charset='utf-8', errors='werkzeug.url_quote', collapse_http_schemes=True)
Extracts the path info from the given URL (or WSGI environment) and path. The path info returned is a string. The URLs might also be IRIs. If the path info could not be determined... | werkzeug.wsgi.index#werkzeug.wsgi.extract_path_info |
FastCGI A very popular deployment setup on servers like lighttpd and nginx is FastCGI. To use your WSGI application with any of them you will need a FastCGI server first. The most popular one is flup which we will use for this guide. Make sure to have it installed. Creating a .fcgi file First you need to create the Fa... | werkzeug.deployment.fastcgi.index |
class werkzeug.datastructures.FileMultiDict(mapping=None)
A special MultiDict that has convenience methods to add files to it. This is used for EnvironBuilder and generally useful for unittesting. Changelog New in version 0.5.
add_file(name, file, filename=None, content_type=None)
Adds a new file to the dict. f... | werkzeug.datastructures.index#werkzeug.datastructures.FileMultiDict |
add_file(name, file, filename=None, content_type=None)
Adds a new file to the dict. file can be a file name or a file-like or a FileStorage object. Parameters
name β the name of the field.
file β a filename or file-like object
filename β an optional filename
content_type β an optional content type | werkzeug.datastructures.index#werkzeug.datastructures.FileMultiDict.add_file |
class werkzeug.datastructures.FileStorage(stream=None, filename=None, name=None, content_type=None, content_length=None, headers=None)
The FileStorage class is a thin wrapper over incoming files. It is used by the request object to represent uploaded files. All the attributes of the wrapper stream are proxied by the ... | werkzeug.datastructures.index#werkzeug.datastructures.FileStorage |
close()
Close the underlying file if possible. | werkzeug.datastructures.index#werkzeug.datastructures.FileStorage.close |
filename
The filename of the file on the client. | werkzeug.datastructures.index#werkzeug.datastructures.FileStorage.filename |
headers
The multipart headers as Headers object. This usually contains irrelevant information but in combination with custom multipart requests the raw headers might be interesting. Changelog New in version 0.6. | werkzeug.datastructures.index#werkzeug.datastructures.FileStorage.headers |
name
The name of the form field. | werkzeug.datastructures.index#werkzeug.datastructures.FileStorage.name |
save(dst, buffer_size=16384)
Save the file to a destination path or file object. If the destination is a file object you have to close it yourself after the call. The buffer size is the number of bytes held in memory during the copy process. It defaults to 16KB. For secure file saving also have a look at secure_filen... | werkzeug.datastructures.index#werkzeug.datastructures.FileStorage.save |
stream
The input stream for the uploaded file. This usually points to an open temporary file. | werkzeug.datastructures.index#werkzeug.datastructures.FileStorage.stream |
class werkzeug.wsgi.FileWrapper(file, buffer_size=8192)
This class can be used to convert a file-like object into an iterable. It yields buffer_size blocks until the file is fully read. You should not use this class directly but rather use the wrap_file() function that uses the WSGI serverβs file wrapper support if i... | werkzeug.wsgi.index#werkzeug.wsgi.FileWrapper |
werkzeug.utils.find_modules(import_path, include_packages=False, recursive=False)
Finds all the modules below a package. This can be useful to automatically import all views / controllers so that their metaclasses / function decorators have a chance to register themselves on the application. Packages are not returned... | werkzeug.utils.index#werkzeug.utils.find_modules |
class werkzeug.routing.FloatConverter(map, min=None, max=None, signed=False)
This converter only accepts floating point values: Rule("/probability/<float:probability>")
By default it only accepts unsigned, positive values. The signed parameter will enable signed, negative values. Rule("/offset/<float(signed=True):of... | werkzeug.routing.index#werkzeug.routing.FloatConverter |
class werkzeug.formparser.FormDataParser(stream_factory=None, charset='utf-8', errors='replace', max_form_memory_size=None, max_content_length=None, cls=None, silent=True)
This class implements parsing of form data for Werkzeug. By itself it can parse multipart and url encoded form data. It can be subclassed and exte... | werkzeug.http.index#werkzeug.formparser.FormDataParser |
werkzeug.http.generate_etag(data)
Generate an etag for some data. Changed in version 2.0: Use SHA-1. MD5 may not be available in some environments. Parameters
data (bytes) β Return type
str | werkzeug.http.index#werkzeug.http.generate_etag |
werkzeug.security.generate_password_hash(password, method='pbkdf2:sha256', salt_length=16)
Hash a password with the given method and salt with a string of the given length. The format of the string returned includes the method that was used so that check_password_hash() can check the hash. The format for the hashed s... | werkzeug.utils.index#werkzeug.security.generate_password_hash |
werkzeug.wsgi.get_content_length(environ)
Returns the content length from the WSGI environment as integer. If itβs not available or chunked transfer encoding is used, None is returned. Changelog New in version 0.9. Parameters
environ (WSGIEnvironment) β the WSGI environ to fetch the content length from. Return t... | werkzeug.wsgi.index#werkzeug.wsgi.get_content_length |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.