A simple web framework based on Tornado.
Project description
Loquat
A simple web framework based on Tornado.
Introduce
Loquat is a web framework based on Tornado.
Installation
pip install loquat
Simple uses
import loquat
from loquat import web
from loquat.handlers.base import BaseHandler
from loquat.utils import utils
class IndexHandler(BaseHandler):
def get(self):
self.render('index.html')
def _init_handlers():
return [
(r"/", IndexHandler)
]
def _init_app_settings():
return {
'debug': True
}
def main():
handlers = _init_handlers()
app_settings = _init_app_settings()
app_config = web.AppConfig(handlers=handlers, app_settings=app_settings, port=8080, env='DEV', app_name='untitled')
web.run(app_config=app_config)
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.1.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for loquat-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3e0ded9197cbeef7df38e2c18a088328e99cf4177e893a3e4900fdf80143837 |
|
MD5 | 6b1d8cdaeb0c6393dd02b81a13a632cf |
|
BLAKE2b-256 | a4f49a76fc63ba4dece65ab203547408ab6bcffdb1c5181abe38f0d2fd750a23 |