Python google.appengine.ext.webapp.util.run_wsgi_app() Examples

The following are code examples for showing how to use google.appengine.ext.webapp.util.run_wsgi_app(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
Project: blockhooks   Author: EthereumWebhooks   File: webapp2.py    Apache License 2.0 6 votes vote down vote up
def run(self, bare=False):
        """Runs this WSGI-compliant application in a CGI environment.

        This uses functions provided by ``google.appengine.ext.webapp.util``,
        if available: ``run_bare_wsgi_app`` and ``run_wsgi_app``.

        Otherwise, it uses ``wsgiref.handlers.CGIHandler().run()``.

        :param bare:
            If True, doesn't add registered WSGI middleware: use
            ``run_bare_wsgi_app`` instead of ``run_wsgi_app``.
        """
        if _webapp_util:
            if bare:
                _webapp_util.run_bare_wsgi_app(self)
            else:
                _webapp_util.run_wsgi_app(self)
        else: # pragma: no cover
            handlers.CGIHandler().run(self) 
Example 2
Project: redis-marshal   Author: mitjafelicijan   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        depr(0, 13, "AppEngineServer no longer required",
             "Configure your application directly in your app.yaml")
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 3
Project: bigbottle   Author: opendiploma   File: bottle.py    Apache License 2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 4
Project: ynm3k   Author: socrateslee   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 5
Project: jerrybuild   Author: fboender   File: bottle.py    GNU General Public License v3.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 6
Project: cdn-cache   Author: gbrunacci   File: bottle.py    Apache License 2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 7
Project: SalesforceXyTools   Author: exiahuang   File: bottle.py    Apache License 2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 8
Project: SQLmap-Command-Builder   Author: kil-x   File: bottle.py    GNU General Public License v3.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 9
Project: projector   Author: bhwhite   File: bottle.py    GNU General Public License v3.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 10
Project: mlab-ns   Author: m-lab   File: main.py    Apache License 2.0 5 votes vote down vote up
def main():
  util.run_wsgi_app(APP) 
Example 11
Project: mlab-ns   Author: m-lab   File: handlers.py    Apache License 2.0 5 votes vote down vote up
def _main():
  webapp_util.run_wsgi_app(_APP) 
Example 12
Project: fgc   Author: mpaulweeks   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 13
Project: silvia-pi   Author: brycesub   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        depr(0, 13, "AppEngineServer no longer required",
             "Configure your application directly in your app.yaml")
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 14
Project: Hatkey   Author: Naayouu   File: application.py    GNU General Public License v3.0 5 votes vote down vote up
def cgirun(self, *middleware):
        """
        Return a CGI handler. This is mostly useful with Google App Engine.
        There you can just do:
        
            main = app.cgirun()
        """
        wsgiapp = self.wsgifunc(*middleware)

        try:
            from google.appengine.ext.webapp.util import run_wsgi_app
            return run_wsgi_app(wsgiapp)
        except ImportError:
            # we're not running from within Google App Engine
            return wsgiref.handlers.CGIHandler().run(wsgiapp) 
Example 15
Project: Hatkey   Author: Naayouu   File: application.py    GNU General Public License v3.0 5 votes vote down vote up
def gaerun(self, *middleware):
        """
        Starts the program in a way that will work with Google app engine,
        no matter which version you are using (2.5 / 2.7)

        If it is 2.5, just normally start it with app.gaerun()

        If it is 2.7, make sure to change the app.yaml handler to point to the
        global variable that contains the result of app.gaerun()

        For example:

        in app.yaml (where code.py is where the main code is located)

            handlers:
            - url: /.*
              script: code.app

        Make sure that the app variable is globally accessible
        """
        wsgiapp = self.wsgifunc(*middleware)
        try:
            # check what version of python is running
            version = sys.version_info[:2]
            major   = version[0]
            minor   = version[1]

            if major != 2:
                raise EnvironmentError("Google App Engine only supports python 2.5 and 2.7")

            # if 2.7, return a function that can be run by gae
            if minor == 7:
                return wsgiapp
            # if 2.5, use run_wsgi_app
            elif minor == 5:
                from google.appengine.ext.webapp.util import run_wsgi_app
                return run_wsgi_app(wsgiapp)
            else:
                raise EnvironmentError("Not a supported platform, use python 2.5 or 2.7")
        except ImportError:
            return wsgiref.handlers.CGIHandler().run(wsgiapp) 
Example 16
Project: TFTHelper   Author: AliMZaini   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 17
Project: WrapSQLMAP   Author: THSamurai   File: bottle.py    GNU General Public License v3.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 18
Project: yarapibabot   Author: antrew   File: bottle.py    GNU General Public License v3.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 19
Project: pysisyphus   Author: eljost   File: bottle.py    GNU General Public License v3.0 5 votes vote down vote up
def run(self, handler):
        depr(0, 13, "AppEngineServer no longer required",
             "Configure your application directly in your app.yaml")
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 20
Project: aws-servicebroker   Author: awslabs   File: bottle.py    Apache License 2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 21
Project: pyFileFixity   Author: lrq3000   File: bottle2.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        util.run_wsgi_app(handler) 
Example 22
Project: pyFileFixity   Author: lrq3000   File: bottle3.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        util.run_wsgi_app(handler) 
Example 23
Project: NoobSec-Toolkit   Author: krintoxi   File: bottle.py    GNU General Public License v2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 24
Project: NoobSec-Toolkit   Author: krintoxi   File: bottle.py    GNU General Public License v2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 25
Project: NoobSec-Toolkit   Author: krintoxi   File: bottle.py    GNU General Public License v2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 26
Project: NoobSec-Toolkit   Author: krintoxi   File: bottle.py    GNU General Public License v2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 27
Project: odr-dab-cir   Author: Opendigitalradio   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 28
Project: datastore-ndb-python   Author: GoogleCloudPlatform   File: hello.py    Apache License 2.0 5 votes vote down vote up
def main():
  util.run_wsgi_app(app) 
Example 29
Project: datastore-ndb-python   Author: GoogleCloudPlatform   File: main.py    Apache License 2.0 5 votes vote down vote up
def main():
  util.run_wsgi_app(app) 
Example 30
Project: datastore-ndb-python   Author: GoogleCloudPlatform   File: fibo.py    Apache License 2.0 5 votes vote down vote up
def main():
  util.run_wsgi_app(app) 
Example 31
Project: datastore-ndb-python   Author: GoogleCloudPlatform   File: dataviewer.py    Apache License 2.0 5 votes vote down vote up
def main():
  util.run_wsgi_app(app) 
Example 32
Project: PixelWeb   Author: ManiacalLabs   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 33
Project: Backend   Author: LockScreen   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 34
Project: Backend   Author: LockScreen   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 35
Project: chromabrush   Author: liuyanghejerry   File: server.py    Apache License 2.0 5 votes vote down vote up
def main():
    application = webapp.WSGIApplication([('/', MainHandler)], debug=False)
    util.run_wsgi_app(application) 
Example 36
Project: chromabrush   Author: liuyanghejerry   File: image.py    Apache License 2.0 5 votes vote down vote up
def main():
  application = webapp.WSGIApplication([
      ('/image/?(.*)', MainHandler)
  ], debug=True)
  util.run_wsgi_app(application) 
Example 37
Project: teye_scanner_for_book   Author: imiyoo2010   File: bottle.py    GNU General Public License v3.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 38
Project: Coursera-Calendar   Author: abhishekgahlot   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 39
Project: saveScreenshot   Author: Adamyuanyuan   File: application.py    Do What The F*ck You Want To Public License 5 votes vote down vote up
def cgirun(self, *middleware):
        """
        Return a CGI handler. This is mostly useful with Google App Engine.
        There you can just do:
        
            main = app.cgirun()
        """
        wsgiapp = self.wsgifunc(*middleware)

        try:
            from google.appengine.ext.webapp.util import run_wsgi_app
            return run_wsgi_app(wsgiapp)
        except ImportError:
            # we're not running from within Google App Engine
            return wsgiref.handlers.CGIHandler().run(wsgiapp) 
Example 40
Project: saveScreenshot   Author: Adamyuanyuan   File: application.py    Do What The F*ck You Want To Public License 5 votes vote down vote up
def cgirun(self, *middleware):
        """
        Return a CGI handler. This is mostly useful with Google App Engine.
        There you can just do:
        
            main = app.cgirun()
        """
        wsgiapp = self.wsgifunc(*middleware)

        try:
            from google.appengine.ext.webapp.util import run_wsgi_app
            return run_wsgi_app(wsgiapp)
        except ImportError:
            # we're not running from within Google App Engine
            return wsgiref.handlers.CGIHandler().run(wsgiapp) 
Example 41
Project: jabawiki   Author: BenDoan   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 42
Project: download-manager   Author: thispc   File: bottle.py    GNU General Public License v3.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 43
Project: bottle-bootstrap   Author: arsho   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        depr(0, 13, "AppEngineServer no longer required",
             "Configure your application directly in your app.yaml")
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 44
Project: finkin   Author: gabelerner   File: application.py    MIT License 5 votes vote down vote up
def cgirun(self, *middleware):
        """
        Return a CGI handler. This is mostly useful with Google App Engine.
        There you can just do:
        
            main = app.cgirun()
        """
        wsgiapp = self.wsgifunc(*middleware)

        try:
            from google.appengine.ext.webapp.util import run_wsgi_app
            return run_wsgi_app(wsgiapp)
        except ImportError:
            # we're not running from within Google App Engine
            return wsgiref.handlers.CGIHandler().run(wsgiapp) 
Example 45
Project: luci-py   Author: luci   File: handlers.py    Apache License 2.0 5 votes vote down vote up
def _main():
  webapp_util.run_wsgi_app(_APP) 
Example 46
Project: luci-py   Author: luci   File: main.py    Apache License 2.0 5 votes vote down vote up
def main():
  util.run_wsgi_app(APP) 
Example 47
Project: luci-py   Author: luci   File: handlers.py    Apache License 2.0 5 votes vote down vote up
def _main():
  webapp_util.run_wsgi_app(_APP) 
Example 48
Project: luci-py   Author: luci   File: main.py    Apache License 2.0 5 votes vote down vote up
def main():
  util.run_wsgi_app(APP) 
Example 49
Project: warriorframework   Author: warriorframework   File: bottle.py    Apache License 2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 50
Project: warriorframework   Author: warriorframework   File: bottle.py    Apache License 2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 51
Project: freestyle-libre-reporter   Author: umax   File: bottle.py    Apache License 2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 52
Project: cocoslive   Author: ricardoquesada   File: zip_handler.py    GNU General Public License v3.0 5 votes vote down vote up
def main():
  """Sets up handlers for the zip files."""
  file_icons = zipserve.make_zip_handler('fileicons.zip')
  flag_icons = zipserve.make_zip_handler('flags.zip')
  fck_editor = zipserve.make_zip_handler('third_party/fckeditor.zip')
  
  application = webapp.WSGIApplication(
      [('/static/images/fileicons/(.*)', file_icons),
       ('/static/images/flags/(.*)', flag_icons),
       ('/fckeditor/(.*)', fck_editor),
      ],
      debug=True)
  util.run_wsgi_app(application) 
Example 53
Project: superpython   Author: labase   File: bottle.py    GNU General Public License v2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 54
Project: opsbro   Author: naparuba   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 55
Project: mfa_slipstream_poc   Author: decidedlygray   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        depr(0, 13, "AppEngineServer no longer required",
             "Configure your application directly in your app.yaml")
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 56
Project: recline   Author: alixedi   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 57
Project: python-compat-runtime   Author: GoogleCloudPlatform   File: legacy_e2e_support_test_app.py    Apache License 2.0 5 votes vote down vote up
def main():
    util.run_wsgi_app(application) 
Example 58
Project: python-compat-runtime   Author: GoogleCloudPlatform   File: __init__.py    Apache License 2.0 5 votes vote down vote up
def main():
  util.run_wsgi_app(application) 
Example 59
Project: python-compat-runtime   Author: GoogleCloudPlatform   File: main.py    Apache License 2.0 5 votes vote down vote up
def main():
  """Main program. Run the Django WSGIApplication."""
  util.run_wsgi_app(app) 
Example 60
Project: python-compat-runtime   Author: GoogleCloudPlatform   File: main.py    Apache License 2.0 5 votes vote down vote up
def main():
  util.run_wsgi_app(APP) 
Example 61
Project: python-compat-runtime   Author: GoogleCloudPlatform   File: main.py    Apache License 2.0 5 votes vote down vote up
def main():
  util.run_wsgi_app(APP) 
Example 62
Project: python-compat-runtime   Author: GoogleCloudPlatform   File: main.py    Apache License 2.0 5 votes vote down vote up
def main():
  util.run_wsgi_app(APP) 
Example 63
Project: Mmrz-Sync   Author: zhanglintc   File: bottle.py    GNU General Public License v3.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 64
Project: slack-machine   Author: DandyDev   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        depr(0, 13, "AppEngineServer no longer required",
             "Configure your application directly in your app.yaml")
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 65
Project: Burp-Addons   Author: SofianeHamlaoui   File: bottle.py    GNU General Public License v3.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 66
Project: avrateNG   Author: Telecommunication-Telemedia-Assessment   File: bottle.py    GNU General Public License v3.0 5 votes vote down vote up
def run(self, handler):
        depr(0, 13, "AppEngineServer no longer required",
             "Configure your application directly in your app.yaml")
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 67
Project: Quick_SLPK_Server   Author: romain974   File: bottle.py    GNU General Public License v3.0 5 votes vote down vote up
def run(self, handler):
        depr(0, 13, "AppEngineServer no longer required",
             "Configure your application directly in your app.yaml")
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 68
Project: asprom   Author: daimoniac   File: bottle.py    Apache License 2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 69
Project: Context-Analysis-Chatbot_Memory-Network   Author: hkim-tech   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 70
Project: Context-Analysis-Chatbot_Memory-Network   Author: hkim-tech   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 71
Project: base1k   Author: xiaq   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 72
Project: bottle_beginner   Author: denzow   File: bottle.py    MIT License 5 votes vote down vote up
def run(self, handler):
        depr(0, 13, "AppEngineServer no longer required",
             "Configure your application directly in your app.yaml")
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 73
Project: you-get-wui   Author: pastebt   File: bottle.py    GNU General Public License v2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler) 
Example 74
Project: IMAC   Author: mitre   File: bottle.py    Apache License 2.0 5 votes vote down vote up
def run(self, handler):
        from google.appengine.ext.webapp import util
        # A main() function in the handler script enables 'App Caching'.
        # Lets makes sure it is there. This _really_ improves performance.
        module = sys.modules.get('__main__')
        if module and not hasattr(module, 'main'):
            module.main = lambda: util.run_wsgi_app(handler)
        util.run_wsgi_app(handler)