CasperSecurity

Current Path : /opt/hikvison/venv/lib/python3.10/site-packages/flask/__pycache__/
Upload File :
Current File : //opt/hikvison/venv/lib/python3.10/site-packages/flask/__pycache__/blueprints.cpython-310.pyc

o

_�KjN�@s�ddlmZddlZddlZddlmZddlmZddl	m
Z
ddlmZddl
mZdd	l
mZdd
lmZejrAddlmZGdd
�d
e�ZdS)�)�annotationsN)�	timedelta�)�AppGroup)�current_app)�send_from_directory)�	Blueprint)�BlueprintSetupState)�	_sentinel)�ResponsecsPeZdZdddddddefd!�fdd�
Zd"dd�Zd#dd�Zd$d%dd �Z�ZS)&rN�name�str�import_name�
static_folder�str | os.PathLike[str] | None�static_url_path�
str | None�template_folder�
url_prefix�	subdomain�url_defaults�dict[str, t.Any] | None�	root_path�	cli_group�return�Nonecs4t��|||||||||	|
�
t�|_|j|j_dS)N)�super�__init__r�clir)�selfrrrrrrrrrr��	__class__��C/opt/hikvison/venv/lib/python3.10/site-packages/flask/blueprints.pyrs
�zBlueprint.__init__�filename�
int | NonecCs0tjd}|durdSt|t�rt|���S|S)anUsed by :func:`send_file` to determine the ``max_age`` cache
        value for a given file path if it wasn't passed.

        By default, this returns :data:`SEND_FILE_MAX_AGE_DEFAULT` from
        the configuration of :data:`~flask.current_app`. This defaults
        to ``None``, which tells the browser to use conditional requests
        instead of a timed cache, which is usually preferable.

        Note this is a duplicate of the same method in the Flask
        class.

        .. versionchanged:: 2.0
            The default configuration is ``None`` instead of 12 hours.

        .. versionadded:: 0.9
        �SEND_FILE_MAX_AGE_DEFAULTN)r�config�
isinstancer�int�
total_seconds)rr$�valuer"r"r#�get_send_file_max_age7s

zBlueprint.get_send_file_max_agercCs0|jstd��|�|�}tt�t|j�||d�S)aAThe view function used to serve files from
        :attr:`static_folder`. A route is automatically registered for
        this view at :attr:`static_url_path` if :attr:`static_folder` is
        set.

        Note this is a duplicate of the same method in the Flask
        class.

        .. versionadded:: 0.5

        z2'static_folder' must be set to serve static_files.)�max_age)�has_static_folder�RuntimeErrorr,r�t�castr
r)rr$r-r"r"r#�send_static_fileRs
�zBlueprint.send_static_file�rb�resource�mode�t.IO[t.AnyStr]cCs&|dvrtd��ttj�|j|�|�S)a�Open a resource file relative to :attr:`root_path` for
        reading.

        For example, if the file ``schema.sql`` is next to the file
        ``app.py`` where the ``Flask`` app is defined, it can be opened
        with:

        .. code-block:: python

            with app.open_resource("schema.sql") as f:
                conn.executescript(f.read())

        :param resource: Path to the resource relative to
            :attr:`root_path`.
        :param mode: Open the file in this mode. Only reading is
            supported, valid values are "r" (or "rt") and "rb".

        Note this is a duplicate of the same method in the Flask
        class.

        >�rr3�rtz)Resources can only be opened for reading.)�
ValueError�open�os�path�joinr)rr4r5r"r"r#�
open_resourcehszBlueprint.open_resource)rr
rr
rrrrrrrrrrrrrrrrrr)r$rrr%)r$r
rr)r3)r4r
r5r
rr6)	�__name__�
__module__�__qualname__r
rr,r2r>�
__classcell__r"r"r r#rs�
$
r)�
__future__rr;�typingr0�datetimerrr�globalsr�helpersr�sansio.blueprintsr�SansioBlueprintr	�sansio.scaffoldr
�
TYPE_CHECKING�wrappersrr"r"r"r#�<module>s
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY