Flask API – Browsable Web APIs for Flask
flaskapi.org
Flask API – Browsable Web APIs for Flask
1–10 of 50 posts
Re: Flask API – Browsable Web APIs for Flask
#2Re: Flask API – Browsable Web APIs for Flask
#3All this would be amazing coupled with angularjs…
Edit Oh, and I join the question: what about flask-restful?
Re: Flask API – Browsable Web APIs for Flask
#4Token auth in flask is something I was going to work on soon. It should be straightforward to use a decorator to protect restricted pages. One thing I am absolutely not clear yet is how you keep the user logged if the token expires after x seconds. I mean, if the user is using the app, somehow the token expiring date should be constantly updated, right? All this would be amazing coupled with angularjs… Edit Oh, and I…
Authentication policies will use a similar style to the renderers and parsers (and all of REST framework). You'll be able to set them per-view with a decorator, or set them system-wide in the config. You'll also be able to support multiple authentication policies.
Re: Flask API – Browsable Web APIs for Flask
#5Why use this and not Flask-RESTful? How is the use case different? http://flask-restful.readthedocs.org/en/latest/
Flask API also shares the same architecture as the core of Django REST framework, which I think just has a really nice separation of concerns.
Also the interface of `request.data` means is easy to transparently support both JSON and form requests, and the nice content negotiation on responses means it's easy to build services that power both an HTML front-end and an API from the same endpoints.
Right now Flask RESTful is more mature of course, but I've got high hopes for this, and it's been super fun to build so far.
Re: Flask API – Browsable Web APIs for Flask
#6Re: Flask API – Browsable Web APIs for Flask
#7Keep it up OP, I'm interested to see how this progresses and I'll be following on github.
[1] flask-login and flask-principal come to mind, though they still require a writing a lot of code (especially flask-principal).
Re: Flask API – Browsable Web APIs for Flask
#8Re: Flask API – Browsable Web APIs for Flask
#9Re: Flask API – Browsable Web APIs for Flask
#10Maybe you could contribute to Eve ( http://python-eve.org ) instead (which is awesome) and already includes some of the features on your roadmap.
I am considering factoring the core of both Flask API and Django REST framework out into a library that could be integrated with any Python web framework - But that's not going to happen right away, so probably not much use to you in the immediate future.
Flask API is pretty simple tho - so there might be bits you can borrow from - perhaps the content negotiation implementation, browsable API implementation, or some of the general API style/separation of concerns that Flask API and Django REST framework both share.
The big win would be having more than one project sharing the same APIs for renderers, parsers, authentication, permissions and throttling policies - that way there'd be scope for writing at least some libraries that work cross-framework.