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.7.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

tornadobase-0.1.7-py2.py3-none-any.whl (5.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file tornadobase-0.1.7.tar.gz.

File metadata

  • Download URL: tornadobase-0.1.7.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tornadobase-0.1.7.tar.gz
Algorithm Hash digest
SHA256 813c2be244ca4c0d94308b13e968ea6bca08abdfe61977c3172fab69b2e1aca8
MD5 13f4e378b32aebd6e493ce5f3326af2c
BLAKE2b-256 c58302c95e3adc78a25c40fb32e11d1d0f9ecc10bee2d69f782139a179a9d44b

See more details on using hashes here.

File details

Details for the file tornadobase-0.1.7-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for tornadobase-0.1.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 95b41572fabdd3fddc8c78699942f2d12b6fb7ce21d8b3733ddb719559a74d77
MD5 2e020c4fe0d400be904863bb68816777
BLAKE2b-256 44036fb3c7142ba25e46b6402327455faff6c66c128a1334031c8b145f753644

See more details on using hashes here.

Supported by

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