"Fossies" - the Fresh Open Source Software Archive

Member "flask-1.1.2/src/flask/__init__.py" (3 Apr 2020, 1894 Bytes) of package /linux/www/flask-1.1.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "__init__.py" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 1.1.1_vs_1.1.2.

    1 # -*- coding: utf-8 -*-
    2 """
    3     flask
    4     ~~~~~
    5 
    6     A microframework based on Werkzeug.  It's extensively documented
    7     and follows best practice patterns.
    8 
    9     :copyright: 2010 Pallets
   10     :license: BSD-3-Clause
   11 """
   12 # utilities we import from Werkzeug and Jinja2 that are unused
   13 # in the module but are exported as public interface.
   14 from jinja2 import escape
   15 from jinja2 import Markup
   16 from werkzeug.exceptions import abort
   17 from werkzeug.utils import redirect
   18 
   19 from . import json
   20 from ._compat import json_available
   21 from .app import Flask
   22 from .app import Request
   23 from .app import Response
   24 from .blueprints import Blueprint
   25 from .config import Config
   26 from .ctx import after_this_request
   27 from .ctx import copy_current_request_context
   28 from .ctx import has_app_context
   29 from .ctx import has_request_context
   30 from .globals import _app_ctx_stack
   31 from .globals import _request_ctx_stack
   32 from .globals import current_app
   33 from .globals import g
   34 from .globals import request
   35 from .globals import session
   36 from .helpers import flash
   37 from .helpers import get_flashed_messages
   38 from .helpers import get_template_attribute
   39 from .helpers import make_response
   40 from .helpers import safe_join
   41 from .helpers import send_file
   42 from .helpers import send_from_directory
   43 from .helpers import stream_with_context
   44 from .helpers import url_for
   45 from .json import jsonify
   46 from .signals import appcontext_popped
   47 from .signals import appcontext_pushed
   48 from .signals import appcontext_tearing_down
   49 from .signals import before_render_template
   50 from .signals import got_request_exception
   51 from .signals import message_flashed
   52 from .signals import request_finished
   53 from .signals import request_started
   54 from .signals import request_tearing_down
   55 from .signals import signals_available
   56 from .signals import template_rendered
   57 from .templating import render_template
   58 from .templating import render_template_string
   59 
   60 __version__ = "1.1.2"