Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)
This class is used to add Server-side Session to one or more Flask
applications.

There are two usage modes.  One is initialize the instance with a very
specific Flask application::

    app = Flask(__name__)
    Session(app)

The second possibility is to create the object once and configure the(more...)

src/f/l/flask-session-HEAD/examples/hello.py   flask-session(Download)
"""
from flask import Flask, session
from flask.ext.session import Session
 
 
app = Flask(__name__)
app.config.from_object(__name__)
Session(app)
 
 

src/f/l/flask-session-HEAD/test_session.py   flask-session(Download)
import unittest
import tempfile
 
import flask
from flask.ext.session import Session
    def test_null_session(self):
        app = flask.Flask(__name__)
        Session(app)
        def expect_exception(f, *args, **kwargs):
            try:
    def test_redis_session(self):
        app = flask.Flask(__name__)
        app.config['SESSION_TYPE'] = 'redis'
        Session(app)
        @app.route('/set', methods=['POST'])
    def test_memcached_session(self):
        app = flask.Flask(__name__)
        app.config['SESSION_TYPE'] = 'memcached'
        Session(app)
        @app.route('/set', methods=['POST'])
    def test_filesystem_session(self):
        app = flask.Flask(__name__)
        app.config['SESSION_TYPE'] = 'filesystem'
        app.config['SESSION_FILE_DIR'] = tempfile.gettempdir()
        Session(app)