Skip to main content

library for easy restful APIs in tornado

Project description

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.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tornado_rest_easy-0.1.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tornado_rest_easy-0.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file tornado_rest_easy-0.1.tar.gz.

File metadata

  • Download URL: tornado_rest_easy-0.1.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for tornado_rest_easy-0.1.tar.gz
Algorithm Hash digest
SHA256 14adc7ff38dd4e69a06e2d7d98dd92049ff3902f4a4e6d39da4ad9a8a6a035fd
MD5 b1abc9dde0c8c9050b84653edbb4e624
BLAKE2b-256 3110f097219e91fa910ffe1f67b837a1ac850f1cdc20a18115314c85468c7660

See more details on using hashes here.

File details

Details for the file tornado_rest_easy-0.1-py3-none-any.whl.

File metadata

  • Download URL: tornado_rest_easy-0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for tornado_rest_easy-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 620281ea4c4d57550e30c8ace60257ef367af3d04cd676c006adebb32d2fe593
MD5 3da7947671b4cec8b06d39dc5a9adf74
BLAKE2b-256 037a92bb3666c83b895257eef84cab927f5a7554ac24edf91edddf1fccb8ca05

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page