<commit_before>## ResTor (Resouce + Tornado)

### Resource Handler based on actions

| url                 | method | action | html5 | form |
|:--------------------|:-------|:-------|:-----:|:----:|
| {prefix}            | GET    | index  | X     |      |
| {prefix}/:id        | GET    | read   | X     |      |
| {prefix}/:id/edit   | GET    | edit   | X     | X    |
| {prefix}/new        | GET    | new    | X     | X    |
| {prefix}            | POST   | create | X     |      |
| {prefix}/:id        | POST   | update | X     |      |
| {prefix}/:id        | PUT    | update |       |      |
| {prefix}/:id/delete | POST   | delete | X     |      |
| {prefix}/:id        | DELETE | delete |       |      |

> {prefix} should be "/animal", "/person", "/job" or any prefix that describe your route 

### Example

```python
import restor
import tornado.web

class MyActions(restor.ResourceHandler):

    def index(self):
        self.write("INDEX")

    def create(self):
        self.write("CREATE")

    def read(self, _id):
        self.write("SHOW " + _id)

    def update(self, _id):
        self.write("UPDATE " + _id)


application = tornado.web.Application([
    (restor.action_routes('/example'), MyActions)
])

if __name__ == "__main__":
    application.listen(8888)
    tornado.ioloop.IOLoop.instance().start()<commit_msg>little fix<commit_after>## ResTor (Resouce + Tornado)

### Resource Handler based on actions

| url                 | method | action | html5 | form |
|:--------------------|:-------|:-------|:-----:|:----:|
| {prefix}            | GET    | index  | X     |      |
| {prefix}/:id        | GET    | read   | X     |      |
| {prefix}/:id/edit   | GET    | edit   | X     | X    |
| {prefix}/new        | GET    | new    | X     | X    |
| {prefix}            | POST   | create | X     |      |
| {prefix}/:id        | POST   | update | X     |      |
| {prefix}/:id        | PUT    | update |       |      |
| {prefix}/:id/delete | POST   | delete | X     |      |
| {prefix}/:id        | DELETE | delete |       |      |

> {prefix} should be "/animal", "/person", "/job" or any prefix that describe your resource route

### Example

```python
import restor
import tornado.web

class MyActions(restor.ResourceHandler):

    def index(self):
        self.write("INDEX")

    def create(self):
        self.write("CREATE")

    def read(self, _id):
        self.write("SHOW " + _id)

    def update(self, _id):
        self.write("UPDATE " + _id)


application = tornado.web.Application([
    (restor.action_routes('/example'), MyActions)
])

if __name__ == "__main__":
    application.listen(8888)
    tornado.ioloop.IOLoop.instance().start()
{'fraction_non_alphanumeric': 0.18901755696675382, 'fraction_numerical': 0.0037355248412401943, 'mean_word_length': 1.6941649899396378, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1477193', 'n_tokens_mistral': 889, 'n_tokens_neox': 860, 'n_words': 193}