Skip to main content

A simple web framework based on Tornado.

Project description

lettuce

A simple web framework based on Tornado.

Introduce

Loquat is a web framework based on Tornado.

Installation

Simple uses

import loquat
from loquat import web
from loquat.handlers.base import BaseHandler


class IndexHandler(BaseHandler):
    def get(self):
        print(">>>")
        self.render('index.html')


class UntitledApplication(loquat.web.Application):

    def __init__(self):
        handlers = [
            (r"/", IndexHandler)
        ]
        app_settings = {
        }
        super().__init__(port=8000, handlers=handlers, **app_settings)


def main():
    app = UntitledApplication()
    web.run(application=app)

if __name__ == "__main__":
    main()

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

loquat-0.1.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

loquat-0.1.0-py2.py3-none-any.whl (5.2 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