/usr/local/lib64/python3.6/site-packages/flask/__pycache__
Edit: /usr/local/lib64/python3.6/site-packages/flask/__pycache__/wrappers.cpython-36.pyc (4901B)
3
^TBg @ s d dl Zd dlmZ d dlmZ d dlmZ ddl m
Z
ddlmZ ddl
mZ ejrjd dlZd d lmZ G d
d deZG dd
d
eZdS ) N)
BadRequest)Request)Response )json)current_app)_split_blueprint_path)Rulec @ s e Zd ZU dZeZdZejd dZ ejej
eejf dZ
eje
eeje dddZeeje dddZeeje dd d
Zeeje dddZddd
dZeddddZdS )r a 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.
Nr )returnc C s t rt jd S dS dS )z8Read-only view of the ``MAX_CONTENT_LENGTH`` config key.ZMAX_CONTENT_LENGTHN)r config)self r
//tmp/pip-build-0s3hx122/flask/flask/wrappers.pymax_content_length5 s
zRequest.max_content_lengthc C s | j dk r| j jS dS )a The endpoint that matched the request URL.
This will be ``None`` if matching failed or has not been
performed yet.
This in combination with :attr:`view_args` can be used to
reconstruct the same URL or a modified URL.
N)url_ruleendpoint)r r
r
r r = s
zRequest.endpointc C s( | j }|dk r$d|kr$|jdd S dS )aj The registered name of the current blueprint.
This will be ``None`` if the endpoint is not part of a
blueprint, or if URL matching failed or has not been performed
yet.
This does not necessarily match the name the blueprint was
created with. It may have been nested, or registered with a
different name.
N.r )r
rpartition)r r r
r
r blueprintL s zRequest.blueprintc C s | j }|dkrg S t|S )zThe registered names of the current blueprint upwards through
parent blueprints.
This will be an empty list if there is no current blueprint, or
if URL matching failed.
.. versionadded:: 2.0.1
N)r r )r namer
r
r
blueprints_ s
zRequest.blueprintsc C s> t j| tr:tjr:| jdkr:| j r:ddlm} || d S )Nzmultipart/form-datar )attach_enctype_error_multidict)RequestBase_load_form_datar debugmimetypefilesZdebughelpersr )r r r
r
r r p s
zRequest._load_form_datazte.NoReturn)er
c C s" t rt jrtd| t d S )NzFailed to decode JSON object: )r r r )r r r
r
r on_json_loading_failed s
zRequest.on_json_loading_failed)__name__
__module____qualname____doc__r json_moduler tOptionalZ view_argsDictstrZAnyZrouting_exception Exceptionpropertyintr r r ZListr r r r
r
r
r r s
r c s2 e Zd ZdZdZeZeed fddZ Z
S )r a The response object that is used by default in Flask. Works like the
response object from Werkzeug but is set to have an HTML mimetype by
default. Quite often you don't have to create this object yourself because
:meth:`~flask.Flask.make_response` will take care of that for you.
If you want to replace the response object used you can subclass this and
set :attr:`~flask.Flask.response_class` to your subclass.
.. versionchanged:: 1.0
JSON support is added to the response, like the request. This is useful
when testing to get the test client response data as JSON.
.. versionchanged:: 1.0
Added :attr:`max_cookie_size`.
z text/html)r
c s t rt jd S t jS )zRead-only view of the :data:`MAX_COOKIE_SIZE` config key.
See :attr:`~werkzeug.wrappers.Response.max_cookie_size` in
Werkzeug's docs.
ZMAX_COOKIE_SIZE)r r supermax_cookie_size)r ) __class__r
r r, s
zResponse.max_cookie_size)r r r! r" Zdefault_mimetyper r# r) r* r,
__classcell__r
r
)r- r r s
r )Ztypingr$ Zwerkzeug.exceptionsr Zwerkzeug.wrappersr r r ZResponseBase r globalsr helpersr Z
TYPE_CHECKINGZtyping_extensionsteZwerkzeug.routingr r
r
r
r
s v