Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Module « flask »

Classe « Request »

Informations générales

Héritage

builtins.object
    Request
        Request
            Request

Définition

class Request(Request):

help(Request)

The request object used by default in Flask.  Remembers the
matched endpoint and view arguments.

It is what ends up as :class:`~flask.request`.  If you want to replace
the request object used you can subclass this and set
:attr:`~flask.Flask.request_class` to your subclass.

The request object is a :class:`~werkzeug.wrappers.Request` subclass and
provides all of the attributes Werkzeug defines plus a few Flask
specific ones.

Constructeur(s)

Signature du constructeur Description
__init__(self, environ: 'WSGIEnvironment', populate_request: 'bool' = True, shallow: 'bool' = False) -> 'None'

Liste des attributs statiques

Nom de l'attribut Valeur
access_control_request_headers<header_property Access-Control-Request-Headers>
access_control_request_method<header_property Access-Control-Request-Method>
content_encoding<header_property Content-Encoding>
content_md5<header_property Content-MD5>
content_type<header_property Content-Type>
date<header_property Date>
input_stream<environ_property wsgi.input>
is_multiprocess<environ_property wsgi.multiprocess>
is_multithread<environ_property wsgi.multithread>
is_run_once<environ_property wsgi.run_once>
json_module<module 'flask.json' from 'C:\\Users\\domin\\Desktop\\Developpements\\EclipseWorkspace\\KooR\\_ApiPython\\venv\\Lib\\site-packages\\flask\\json\\__init__.py'>
max_forwards<header_property Max-Forwards>
origin<header_property Origin>
referrer<header_property Referer>
remote_user<environ_property REMOTE_USER>
routing_exceptionNone
trusted_hostsNone
url_ruleNone
view_argsNone

Attributs statiques hérités de la classe Request

max_content_length, max_form_memory_size, max_form_parts

Liste des propriétés

Nom de la propriétéDescription
accept_charsetsList of charsets this client supports as [extrait de accept_charsets.__doc__]
accept_encodingsList of encodings this client accepts. Encodings in a HTTP term [extrait de accept_encodings.__doc__]
accept_languagesList of languages this client accepts as [extrait de accept_languages.__doc__]
accept_mimetypesList of mimetypes this client supports as [extrait de accept_mimetypes.__doc__]
access_routeIf a forwarded header exists this is a list of all ip addresses [extrait de access_route.__doc__]
argsThe parsed URL parameters (the part in the URL after the question [extrait de args.__doc__]
authorizationThe ``Authorization`` header parsed into an :class:`.Authorization` object. [extrait de authorization.__doc__]
base_urlLike :attr:`url` but without the query string. [extrait de base_url.__doc__]
blueprintThe registered name of the current blueprint. [extrait de blueprint.__doc__]
blueprintsThe registered names of the current blueprint upwards through [extrait de blueprints.__doc__]
cache_controlA :class:`~werkzeug.datastructures.RequestCacheControl` object [extrait de cache_control.__doc__]
content_lengthThe Content-Length entity-header field indicates the size of the [extrait de content_length.__doc__]
cookiesA :class:`dict` with the contents of all cookies transmitted with [extrait de cookies.__doc__]
dataThe raw data read from :attr:`stream`. Will be empty if the request [extrait de data.__doc__]
endpointThe endpoint that matched the request URL. [extrait de endpoint.__doc__]
files:class:`~werkzeug.datastructures.MultiDict` object containing [extrait de files.__doc__]
formThe form parameters. By default an [extrait de form.__doc__]
full_pathRequested path, including the query string. [extrait de full_path.__doc__]
hostThe host name the request was made to, including the port if [extrait de host.__doc__]
host_urlThe request URL scheme and host only. [extrait de host_url.__doc__]
if_matchAn object containing all the etags in the `If-Match` header. [extrait de if_match.__doc__]
if_modified_sinceThe parsed `If-Modified-Since` header as a datetime object. [extrait de if_modified_since.__doc__]
if_none_matchAn object containing all the etags in the `If-None-Match` header. [extrait de if_none_match.__doc__]
if_rangeThe parsed ``If-Range`` header. [extrait de if_range.__doc__]
if_unmodified_sinceThe parsed `If-Unmodified-Since` header as a datetime object. [extrait de if_unmodified_since.__doc__]
is_jsonCheck if the mimetype indicates JSON data, either [extrait de is_json.__doc__]
is_secure``True`` if the request was made with a secure protocol [extrait de is_secure.__doc__]
jsonThe parsed JSON data if :attr:`mimetype` indicates JSON [extrait de json.__doc__]
max_content_lengthThe maximum number of bytes that will be read during this request. If [extrait de max_content_length.__doc__]
max_form_memory_sizeThe maximum size in bytes any non-file form field may be in a [extrait de max_form_memory_size.__doc__]
max_form_partsThe maximum number of fields that may be present in a [extrait de max_form_parts.__doc__]
mimetypeLike :attr:`content_type`, but without parameters (eg, without [extrait de mimetype.__doc__]
mimetype_paramsThe mimetype parameters as dict. For example if the content [extrait de mimetype_params.__doc__]
pragmaThe Pragma general-header field is used to include [extrait de pragma.__doc__]
rangeThe parsed `Range` header. [extrait de range.__doc__]
root_urlThe request URL scheme, host, and root path. This is the root [extrait de root_url.__doc__]
script_rootAlias for :attr:`self.root_path`. ``environ["SCRIPT_ROOT"]`` [extrait de script_root.__doc__]
streamThe WSGI input stream, with safety checks. This stream can only be consumed [extrait de stream.__doc__]
urlThe full request URL with the scheme, host, root path, path, [extrait de url.__doc__]
url_rootAlias for :attr:`root_url`. The URL with scheme, host, and [extrait de url_root.__doc__]
user_agentThe user agent. Use ``user_agent.string`` to get the header [extrait de user_agent.__doc__]
valuesA :class:`werkzeug.datastructures.CombinedMultiDict` that [extrait de values.__doc__]
want_form_data_parsed``True`` if the request method carries content. By default [extrait de want_form_data_parsed.__doc__]

Liste des opérateurs

Opérateurs hérités de la classe object

__eq__, __ge__, __gt__, __le__, __lt__, __ne__

Liste des méthodes

Toutes les méthodes Méthodes d'instance Méthodes statiques Méthodes dépréciées
Signature de la méthodeDescription
__enter__(self) -> 'Request'
__exit__(self, exc_type, exc_value, tb) -> 'None'
__repr__(self) -> 'str'
application(f: 't.Callable[[Request], WSGIApplication]') -> 'WSGIApplication' Decorate a function as responder that accepts the request as [extrait de application.__doc__]
close(self) -> 'None' Closes associated resources of this request object. This [extrait de close.__doc__]
from_values(*args: 't.Any', **kwargs: 't.Any') -> 'Request' Create a new request object based on the values provided. If [extrait de from_values.__doc__]
get_data(self, cache: 'bool' = True, as_text: 'bool' = False, parse_form_data: 'bool' = False) -> 'bytes | str' This reads the buffered incoming data from the client into one [extrait de get_data.__doc__]
get_json(self, force: 'bool' = False, silent: 'bool' = False, cache: 'bool' = True) -> 't.Any | None' Parse :attr:`data` as JSON. [extrait de get_json.__doc__]
make_form_data_parser(self) -> 'FormDataParser' Creates the form data parser. Instantiates the [extrait de make_form_data_parser.__doc__]
on_json_loading_failed(self, e: 'ValueError | None') -> 't.Any'

Méthodes héritées de la classe Request

__init_subclass__, __subclasshook__

Méthodes héritées de la classe object

__delattr__, __dir__, __format__, __getattribute__, __getstate__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__

Vous êtes un professionnel et vous avez besoin d'une formation ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé