Metadata-Version: 1.0
Name: wesgi
Version: 0.7
Summary: A WSGI middleware which processes ESI directives
Home-page: http://pypi.python.org/pypi/wesgi
Author: Brian Sutherland
Author-email: brian@vanguardistas.net
License: UNKNOWN
Description: This package implements an ESI Processor as a WSGI middeware. It is primarily
        aimed at development environments to simulate the production ESI Processor.
        
        The relevant specifications and documents are:
        - http://www.w3.org/TR/esi-lang
        - http://www.akamai.com/dl/technical_publications/esi_faq.pdf
        
        Completeness
        ============
        
        This implementation currently only implements <esi:include>.
        
        Performance
        ===========
        
        Realistically, under standard Python, WSGI middleware is synchronous. For an
        ESI Processor to reach very high levels of performance, it is probably
        necessary for it to be asynchronous. That probably puts an upper limit on the
        perfomance of this middleware.
        
        However, depending on the situation, it may be performant enough.
        
        Usage
        =====
        
        >>> from wesgi import MiddleWare
        >>> from wsgiref.simple_server import demo_app
        
        To use it in it's default configuration for a development server:
        
        >>> app = MiddleWare(demo_app)
        
        To simulate an Akamai Production environment:
        
        >>> app = MiddleWare(demo_app, policy='akamai')
        
        To simulate an Akamai Production environment with "chase redirect" turned on:
        
        >>> from wesgi import AkamaiPolicy
        >>> policy = AkamaiPolicy()
        >>> policy.chase_redirect = True
        >>> app = MiddleWare(demo_app, policy=policy)
        
        If you wish to use it for a production server, it's advisable to turn debug
        mode off and enable some kind of cache:
        
        >>> from wesgi import LRUCache
        >>> from wesgi import Policy
        >>> policy.cache = LRUCache()
        >>> app = MiddleWare(demo_app, debug=False, policy=policy)
        
        The LRUCache is a memory based cache using an approximation of the LRU
        algorithm. The good parts of it were inspired by Raymond Hettinger's lru_cache
        recipe.
        
        Other available caches that can be easily integrated are httplib2's FileCache
        or memcache. See the httplib2 documentation for details.
        
        CHANGES
        =======
        
        0.6 (2011-07-06)
        ----------------
        
        Features
        ++++++++
        
        - Major refactoring to use httplib2 as the backend to get ESI includes. This
        brings along HTTP Caching.
        - A memory based implementation of the LRU caching algoritm at wesgi.LRUCache.
        - Handle ESI comments.
        
        Bugfixes
        ++++++++
        
        - Fix bug where regular expression to find src:includes could take a long time.
        
        0.5 (2011-07-04)
        ----------------
        
        - Initial release.
        
Keywords: web middleware wsgi esi
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
