Metadata-Version: 2.1
Name: loquat
Version: 0.1.4
Summary: A simple web framework based on Tornado.
Home-page: https://github.com/guanzhenxing/loquat.git
Author: Jesen Kwan
Author-email: guan.zhenxing@foxmail.com
License: MIT
Keywords: tornado,web framework
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Database
Requires-Python: >=3.5.0
Description-Content-Type: text/markdown
Requires-Dist: tornado


# Loquat

A simple web framework based on Tornado.

## Introduce

Loquat is a web framework based on Tornado.

## Installation

```shell
pip install loquat
```

## Simple uses

```python
from loquat.handlers.base import BaseHandler
from loquat.server import Server
from loquat.web import Application

class IndexHandler(BaseHandler):

    def initialize(self, database):
        self.database = database

    def get(self):
        self.write("hello world!")


class TestApplication(Application):
    def __init__(self, handlers=None, middlewares=None, transforms=None):
        super().__init__(handlers, middlewares, transforms)

def main():
    handlers = [
        (r"/", IndexHandler, dict(database="this is database"))
    ]

    application = TestApplication(handlers=handlers)
    server = Server(application)
    server.start()


if __name__ == "__main__":
    main()

```

