Metadata-Version: 2.1
Name: tornado-rest-easy
Version: 0.1
Summary: library for easy restful APIs in tornado
Home-page: https://github.com/postelrich/tornado-restful
Author: Richard Postelnik
Author-email: richard.postelnik@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
Requires-Dist: tornado

# 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

```python
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](https://github.com/postelrich/tornado_rest_easy/blob/master/LICENSE).


