tornado_rest_easy - RESTful extension for tornado
This library aims to make it quicker and easier to define a RESTful API in tornado. Originally inspired by github.com/rancavil/tornado-rest.
Installation
pip install tornado_rest_easy
Usage
from tornado_rest_easy import RestfulHandler, RestfulMetaType, get, post
class WidgetHandler(RestfulHandler, metaclass=RestfulMetaType):
@get('/widgets')
def all_widgets(self):
return [widget1, widget2, ...]
@get('/widgets/<int:id>')
def get_widget(self, id):
return widgets[id]
@post('/widgets'):
def add_widget(self):
return 'Widget added'
app = Application(WidgetHandler.get_handlers(dict(db=db))
License
New BSD. See license.
Metadata
Release files for tornado-rest-easy 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tornado_rest_easy-0.1.tar.gz | 21.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tornado_rest_easy-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.6 kB
Release files / tornado_rest_easy-0.1.tar.gz
| Download URL | tornado_rest_easy-0.1.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14adc7ff38dd4e69a06e2d7d98dd92049ff3902f4a4e6d39da4ad9a8a6a035fd
|
|
BLAKE2b-256 checksum How to use checksums |
3110f097219e91fa910ffe1f67b837a1ac850f1cdc20a18115314c85468c7660
|
| 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/47.1.1.post20200604 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
|
Release files / tornado_rest_easy-0.1-py3-none-any.whl
| Download URL | tornado_rest_easy-0.1-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
620281ea4c4d57550e30c8ace60257ef367af3d04cd676c006adebb32d2fe593
|
|
BLAKE2b-256 checksum How to use checksums |
037a92bb3666c83b895257eef84cab927f5a7554ac24edf91edddf1fccb8ca05
|
| 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/47.1.1.post20200604 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7
|