Hacker News new | past | comments | ask | show | jobs | submit login

Yeah same here. It has the cleanest mapping from REST resources to Python class + method. It just made sense to me:

The router block at the top plus:

    class MyResource:

       def GET(self,...): ...

       def POST(self,...): ...

       def PUT(self,...): ...

       def DELETE(self,...): ...
Looks really nice. Haven't tried serving or rendering templates from it, so never tested that code.



Check out Flask's MethodView


Oh Cool. Hadn't seen that before. I like MethodView dispatch pattern.


FWIW, many other python web frameworks use the very same pattern.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: