Re:New Python REST API and CLI micro-framework
by timothycrosley on Thursday February 18, 2016 @11:25PM
(#11131530)
author here: This is way more then Flask/Bottle, I understand what would make you reach that conclusion, but if you look here https://github.com/timothycrosley/hug/blob/develop/ARCHITECT... You can see just how much it adds that really are core concepts that can't be done with simple decorators on-top of Flask.
Highlights:
- Automatic documentation - Type annotation based validation and transformation of input fields - Directives to inject more data (like request data) into existing functions in a safe and reusable way - It's easily twice as fast at handling requests as Flask, making Flask a rather horrible base for any competitor
Re:New Python REST API and CLI micro-framework
by gsibble on Friday February 19, 2016 @11:05AM
(#11134294)
I would argue that it handles requests twice as fast because it contains about half as many features. And I've added automatic documentation to many of my flask projects. Not knocking on your excellent project, just suggesting you stop knocking on Flask, which is an excellent wsgi server.
Re:New Python REST API and CLI micro-framework
by timothycrosley on Friday February 19, 2016 @11:33AM
(#11134491)
Hug contains the features flask contains. I haven't and I don't think you will in this entire thread see a single example of someone actually pointing a feature missing in hug that is relevant for APIs (not HTML websites like Jinja)
Re:New Python REST API and CLI micro-framework
by kstrauser on Friday February 19, 2016 @11:31AM
(#11134467)
Likewise. Flask surely isn't the end-all, be-all of web frameworks, but I've added autodocs to it for a past employer that included full autodiscovery. It's not exactly trivial but it's far from difficult.
The API versioning bit is interesting, it would work well as a Flask decorator.