bottle-beaker-0.1.3/0000755000175000001440000000000012743750415015057 5ustar avelinousers00000000000000bottle-beaker-0.1.3/bottle_beaker.egg-info/0000755000175000001440000000000012743750415021353 5ustar avelinousers00000000000000bottle-beaker-0.1.3/bottle_beaker.egg-info/PKG-INFO0000644000175000001440000000136512743750415022455 0ustar avelinousers00000000000000Metadata-Version: 1.1 Name: bottle-beaker Version: 0.1.3 Summary: Bottle plugin beaker, WSGI middleware for sessions and caching Home-page: https://github.com/bottlepy/bottle-beaker Author: Thiago Avelino Author-email: thiago@avelino.xxx License: MIT Description: UNKNOWN Platform: any Classifier: Environment :: Web Environment Classifier: Environment :: Plugins Classifier: Framework :: Bottle Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content Classifier: Topic :: Software Development :: Libraries :: Python Modules Requires: bottle (>=0.9) Requires: beaker bottle-beaker-0.1.3/bottle_beaker.egg-info/SOURCES.txt0000644000175000001440000000044512743750415023242 0ustar avelinousers00000000000000LICENSE MANIFEST.in README.rst bottle_beaker.py requirements.txt setup.py bottle_beaker.egg-info/PKG-INFO bottle_beaker.egg-info/SOURCES.txt bottle_beaker.egg-info/dependency_links.txt bottle_beaker.egg-info/not-zip-safe bottle_beaker.egg-info/requires.txt bottle_beaker.egg-info/top_level.txtbottle-beaker-0.1.3/bottle_beaker.egg-info/dependency_links.txt0000644000175000001440000000000112743750415025421 0ustar avelinousers00000000000000 bottle-beaker-0.1.3/bottle_beaker.egg-info/not-zip-safe0000644000175000001440000000000112741521257023577 0ustar avelinousers00000000000000 bottle-beaker-0.1.3/bottle_beaker.egg-info/requires.txt0000644000175000001440000000002312743750415023746 0ustar avelinousers00000000000000bottle>=0.9 beaker bottle-beaker-0.1.3/bottle_beaker.egg-info/top_level.txt0000644000175000001440000000001612743750415024102 0ustar avelinousers00000000000000bottle_beaker bottle-beaker-0.1.3/LICENSE0000644000175000001440000000207012741521102016046 0ustar avelinousers00000000000000The MIT License (MIT) Copyright (c) 2014 Thiago Avelino Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.bottle-beaker-0.1.3/MANIFEST.in0000644000175000001440000000007512743750176016623 0ustar avelinousers00000000000000include bottle_beaker.py requirements.txt README.rst LICENSE bottle-beaker-0.1.3/README.rst0000644000175000001440000000124212741523567016551 0ustar avelinousers00000000000000============= bottle-beaker ============= Bottle plugin to session and caching library with WSGI Middleware Example ------- .. code-block:: python import bottle from bottle.ext import beaker session_opts = { 'session.type': 'file', 'session.cookie_expires': 300, 'session.data_dir': './data', 'session.auto': True } app = beaker.middleware.SessionMiddleware(bottle.app(), session_opts) @bottle.route('/test') def test(): s = bottle.request.environ.get('beaker.session') s['test'] = s.get('test',0) + 1 s.save() return 'Test counter: %d' % s['test'] bottle.run(app=app) bottle-beaker-0.1.3/bottle_beaker.py0000644000175000001440000000234312741523411020225 0ustar avelinousers00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- import bottle import inspect import beaker from beaker import middleware class BeakerPlugin(object): name = 'beaker' def __init__(self, keyword='beaker'): """ :param keyword: Keyword used to inject beaker in a route """ self.keyword = keyword def setup(self, app): """ Make sure that other installed plugins don't affect the same keyword argument and check if metadata is available.""" for other in app.plugins: if not isinstance(other, BeakerPlugin): continue if other.keyword == self.keyword: raise bottle.PluginError("Found another beaker plugin " "with conflicting settings (" "non-unique keyword).") def apply(self, callback, context): args = inspect.getargspec(context['callback'])[0] if self.keyword not in args: return callback def wrapper(*args, **kwargs): kwargs[self.keyword] = beaker kwargs["{0}_middleware".format(self.keyword)] = middleware return callback(*args, **kwargs) return wrapper bottle-beaker-0.1.3/requirements.txt0000644000175000001440000000002312741523743020336 0ustar avelinousers00000000000000bottle>=0.9 beaker bottle-beaker-0.1.3/setup.py0000644000175000001440000000203612743750224016570 0ustar avelinousers00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup description = "Bottle plugin beaker, WSGI middleware for sessions and caching" REQUIREMENTS = [i.strip() for i in open("requirements.txt").readlines()] setup( name='bottle-beaker', version="0.1.3", description=description, author="Thiago Avelino", author_email="thiago@avelino.xxx", license='MIT', platforms='any', zip_safe=False, url='https://github.com/bottlepy/bottle-beaker', py_modules=['bottle_beaker'], install_requires = REQUIREMENTS, requires=['bottle (>=0.9)', 'beaker'], classifiers=[ 'Environment :: Web Environment', 'Environment :: Plugins', 'Framework :: Bottle', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', 'Topic :: Software Development :: Libraries :: Python Modules' ], ) bottle-beaker-0.1.3/PKG-INFO0000644000175000001440000000136512743750415016161 0ustar avelinousers00000000000000Metadata-Version: 1.1 Name: bottle-beaker Version: 0.1.3 Summary: Bottle plugin beaker, WSGI middleware for sessions and caching Home-page: https://github.com/bottlepy/bottle-beaker Author: Thiago Avelino Author-email: thiago@avelino.xxx License: MIT Description: UNKNOWN Platform: any Classifier: Environment :: Web Environment Classifier: Environment :: Plugins Classifier: Framework :: Bottle Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content Classifier: Topic :: Software Development :: Libraries :: Python Modules Requires: bottle (>=0.9) Requires: beaker bottle-beaker-0.1.3/setup.cfg0000644000175000001440000000007312743750415016700 0ustar avelinousers00000000000000[egg_info] tag_build = tag_date = 0 tag_svn_revision = 0