Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
__init__.py62 linesDownload Raw Back to flask
1from __future__ import annotations2 3import typing as t4 5from . import json as json6from .app import Flask as Flask7from .blueprints import Blueprint as Blueprint8from .config import Config as Config9from .ctx import after_this_request as after_this_request10from .ctx import copy_current_request_context as copy_current_request_context11from .ctx import has_app_context as has_app_context12from .ctx import has_request_context as has_request_context13from .globals import current_app as current_app14from .globals import g as g15from .globals import request as request16from .globals import session as session17from .helpers import abort as abort18from .helpers import flash as flash19from .helpers import get_flashed_messages as get_flashed_messages20from .helpers import get_template_attribute as get_template_attribute21from .helpers import make_response as make_response22from .helpers import redirect as redirect23from .helpers import send_file as send_file24from .helpers import send_from_directory as send_from_directory25from .helpers import stream_with_context as stream_with_context26from .helpers import url_for as url_for27from .json import jsonify as jsonify28from .signals import appcontext_popped as appcontext_popped29from .signals import appcontext_pushed as appcontext_pushed30from .signals import appcontext_tearing_down as appcontext_tearing_down31from .signals import before_render_template as before_render_template32from .signals import got_request_exception as got_request_exception33from .signals import message_flashed as message_flashed34from .signals import request_finished as request_finished35from .signals import request_started as request_started36from .signals import request_tearing_down as request_tearing_down37from .signals import template_rendered as template_rendered38from .templating import render_template as render_template39from .templating import render_template_string as render_template_string40from .templating import stream_template as stream_template41from .templating import stream_template_string as stream_template_string42from .wrappers import Request as Request43from .wrappers import Response as Response44 45if not t.TYPE_CHECKING:46 47    def __getattr__(name: str) -> t.Any:48        if name == "__version__":49            import importlib.metadata50            import warnings51 52            warnings.warn(53                "The '__version__' attribute is deprecated and will be removed in"54                " Flask 3.2. Use feature detection or"55                " 'importlib.metadata.version(\"flask\")' instead.",56                DeprecationWarning,57                stacklevel=2,58            )59            return importlib.metadata.version("flask")60 61        raise AttributeError(name)62 
codekingpro/portable-devtools · Team Ai