Loquat
A simple web framework based on Tornado.
Introduce
Loquat is a web framework based on Tornado.
Installation
pip install loquat
Simple uses
from loquat.server import Server
from loquat.web import Application
from handler import BaseHandler
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()
Metadata
Release files for loquat 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| loquat-0.1.7.tar.gz | 11.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| loquat-0.1.7-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 25.6 kB
Release files / loquat-0.1.7.tar.gz
| Download URL | loquat-0.1.7.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1be3ebbc30e2109fd6b9ffeb6c129f3e83880eca16f58960bfdb39f80da7fc47
|
|
BLAKE2b-256 checksum How to use checksums |
355268cd15a2f03042d49b120e6da116a46127d6784d5b48a7db5ef34ebfbfe8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
|
Release files / loquat-0.1.7-py2.py3-none-any.whl
| Download URL | loquat-0.1.7-py2.py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a1c7ad922ea562b28f32959532add374d6b6faf3f1be08107eea32d967f02f3d
|
|
BLAKE2b-256 checksum How to use checksums |
61b876ba13a96704bf121dc6f8958f4e19f8d53f86a43e939cf147dd3d6e5ec0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
|