2010-07-02 14:20:58 -04:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
"""
|
|
|
|
|
flask
|
|
|
|
|
~~~~~
|
|
|
|
|
|
|
|
|
|
A microframework based on Werkzeug. It's extensively documented
|
|
|
|
|
and follows best practice patterns.
|
|
|
|
|
|
2011-09-01 16:57:00 +02:00
|
|
|
:copyright: (c) 2011 by Armin Ronacher.
|
2010-07-02 14:20:58 -04:00
|
|
|
:license: BSD, see LICENSE for more details.
|
|
|
|
|
"""
|
|
|
|
|
|
2011-09-29 23:36:57 +02:00
|
|
|
__version__ = '0.9-dev'
|
2011-06-27 00:31:24 +02:00
|
|
|
|
2010-07-02 14:20:58 -04:00
|
|
|
# utilities we import from Werkzeug and Jinja2 that are unused
|
|
|
|
|
# in the module but are exported as public interface.
|
2011-07-15 18:03:48 +02:00
|
|
|
from werkzeug.exceptions import abort
|
|
|
|
|
from werkzeug.utils import redirect
|
2010-07-02 14:20:58 -04:00
|
|
|
from jinja2 import Markup, escape
|
|
|
|
|
|
2010-07-04 20:00:23 +02:00
|
|
|
from .app import Flask, Request, Response
|
|
|
|
|
from .config import Config
|
|
|
|
|
from .helpers import url_for, jsonify, json_available, flash, \
|
2010-07-05 10:23:35 +02:00
|
|
|
send_file, send_from_directory, get_flashed_messages, \
|
2011-04-04 16:53:04 +02:00
|
|
|
get_template_attribute, make_response, safe_join
|
2010-07-04 20:00:23 +02:00
|
|
|
from .globals import current_app, g, request, session, _request_ctx_stack
|
2011-03-14 16:13:58 -04:00
|
|
|
from .ctx import has_request_context
|
2010-07-04 20:00:23 +02:00
|
|
|
from .module import Module
|
2011-05-29 20:05:39 +02:00
|
|
|
from .blueprints import Blueprint
|
2010-07-04 20:00:23 +02:00
|
|
|
from .templating import render_template, render_template_string
|
2010-07-04 17:21:13 +02:00
|
|
|
|
2010-07-17 14:39:28 +02:00
|
|
|
# the signals
|
|
|
|
|
from .signals import signals_available, template_rendered, request_started, \
|
2011-05-27 20:10:53 +02:00
|
|
|
request_finished, got_request_exception, request_tearing_down
|
2010-07-17 14:39:28 +02:00
|
|
|
|
2010-07-04 17:21:13 +02:00
|
|
|
# only import json if it's available
|
|
|
|
|
if json_available:
|
2010-07-04 20:00:23 +02:00
|
|
|
from .helpers import json
|
2011-07-07 13:14:15 +02:00
|
|
|
|
|
|
|
|
# backwards compat, goes away in 1.0
|
|
|
|
|
from .sessions import SecureCookieSession as Session
|