mozilla-services/mozservices — pull request #3 by rfk (2011-11-04 00:09:56+00:00)
Title: add get_configurator helper function

This is a helper method I was toying with to reduce the boilerplate in our someapp/__init__.py:main. With it the initialisation code for keyretrieval becomes::

from mozsvc.config import get_configurator

def includeme(config):
config.include("pyramid_multiauth")
config.include("cornice")
config.include("mozsvc")
config.scan("keyretrieval.views")

def main(global_config, **settings):
config = get_configurator(global_config, **settings)
config.include(includeme)
return config.make_wsgi_app()

Thoughts?