Skip to main content

Starter application and handlers for tornado web apps.

Project description

https://travis-ci.org/coyote240/tornadobase.svg?branch=master

A base application and boilerplate for the Tornado web server.

Installation

To include tornadobase in your application install using pip:

pip install tornadobase

Run the tests

pip install nose

nosetests

Use

tornadobase provides basic Application and Handler classes that wrap up some of the boilerplate you’ll typically need when using the Tornado web server. To get a simple site running, create a file called application.py:

from tornadobase.handlers import BaseHandler
from tornadobase.application import Application

class IndexHandler(BaseHandler):

    def get(self):
        self.write('Hello, World!')


class MyApp(Application):

    def init_handlers(self):

        self.handlers = [
            (r'/', IndexHandler)
        ]

Then start the web server:

python application.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tornadobase-0.1.2.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

tornadobase-0.1.2-py2.py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page