Django REST framework 3.1 released
django-rest-framework.org
django-rest-framework.org
What are the plans (if any) for continued development on Flask-API?
It'd be interesting to get your opinion on what your take would be on using Django/Django REST framework if it had decent built-in support for use with SQLAlchemy.
Said it before, and I'll say it again - DRF is one of the few things that makes me wish I was on Django.
Is the newer DRF code abstracted nicely to make a port to Flask easier?
It's something I actually looked at doing myself a year ago but there looked to be a lot of effort involved.
I often look at projects that are Django-this or Flask-that and think to myself - this could be a nice clean agnostic library with layers for which ever framework. Often by that stage it's too late, everything is too embedded.
In this case, I guess that DRF intrinsically deals with the framework specific layers a lot so it's probably necessarily tightly bound.
The main questions would be how we'd manage support, packaging, documentation etc. Also is the benefit worth it if it means an extra level of indirection for our existing user-base? Right now focusing on Django REST framework in it's current form feels like the best effort-reward, but there's no fundamental architectural reasons stopping us from moving to a more decoupled core, with a Django specific integration layer on top of that.
That said, if the core was sufficiently decoupled that you could split it out, that would be a major win for the Flask guys. pip install djangorestframework could work just as it does (by installing drf_core). The Flask community could then create flaskrestframework which also installs the core and uses that. I guess the djangorestframework project could even contain everything, so long as the core module didn't depend on django.
Then the Flask guys could maintain a wrapper and some lightweight Flask specific documentation with references back to the main docs.
As I say, it would be silly to do it now, but if it turned out to be easy to do in the long run, it wouldn't have to impact on the work you're doing too much.
As ever, even though I'm not even using the project, thanks for the work. I spent a long time reading through your code a couple of years back. It was really enlightening and I learnt a lot. Thanks again.
There are a hodge-podge of plugins to do various things, but they don't necessarily share the same design principles or work well together. Some are so abstracted that by the time you've got a concrete implementation you could have just rolled your own.
EDIT: Grammar, added a sentence.
When you say "there's no story" around auth, endpoint versioning, and other things does that just mean that you're not forced to follow those conventions with Flask / that Django offers utilities to help? I am a bit confused/curious what you meant by that since I've seen some wonderful Flask auth work, and endpoint versioning is pretty standard on most APIs, but seems like Django is a bit more strict with what they want you to do.
Of course if the database you're working with is a shambles, then you're going to have a bad time.
Relevant docs: https://docs.djangoproject.com/en/1.7/howto/legacy-databases...
What is your long term vision for the project?
Reason I ask is due to how django keeps (IMO) gaining territory on the corporate and/or business stack. I get requests for support and new development consistently from companies in different markets/regions.
We tend to be fairly aggressive about keeping the scope manageable in order to keep to that. For example 3.1 moves some functionality out into third party packages, so that we can concentrate on the quality of the core framework.
Some of the longer term feature work:
* Admin style interface - See https://www.kickstarter.com/projects/tomchristie/django-rest...
* Fuller support for alternative storage backends. Eg. Easier to integrate with SQLAlchemy, as an alternative to the Django ORM.
* Hypermedia support & client library. (Too involved to go into detail here.)
E.g. there are dozens of pages on how to implement serializers, which is great, but the section on the benefits of serializers is only a paragraph or two long. So after reading all the documentation I'm still unclear as to the best practices on when vs when not to use them, and what the best practices are for endpoints that don't take advantage of them. I'm sure this kind of stuff is obvious to people who have been using it for a while, but after just going through the tutorial and then reading the relevant API pages I was still unclear on a bunch of issues.
Please do feel free to follow this up by raising an issue on the repository - it'd be good to talk through some specifics about areas to improve.
I've been using tastypie for the past few months in a project and I'm kindof regretting it - I'm finding some of the design decisions hard to understand and not super well documented. But I've gotten to the point where I'm using it in production and it feels like it might be too big of a pain to switch at this point.
Right now I'm using django-restless. I'm sticking with it for now. It uses Django forms for validation, which works ok even though they weren't meant for validating json input. Now I'm wondering if it would be best to just use Django, and be restless in style. Perhaps DRF, restless or some other libraries would have some pieces that I could use in a more library fashion if I wanted them.
The authentication framework and the Model serializer are really good points to start, but I was missing some versioning scheme and 1 week later here it comes. Great work, Tom.
I'm not sure what you mean here, but I'd suggest opening an issue if you believe there's a problem - we're pretty comprehensive about dealing with incoming issues.
My personal take on this is forget about "shitty hacks" or trying to handle this automatically, and just write the serializer create and update methods explicitly.
Most recently I created a new handler object that runs some introspection of the model. I then override my model view sets' create and update methods to implement the handler. Maybe I should get off my ass and open source it (currently buried in a project).