0

Is there any way to handle query per user limitations with tastypie API library ?

I would like for example to limit all users to 200 queries per day.

I looked all over the documentation and only found how to handle query results ranges limitations.

Edit : I found out that piston was proposing query throttling but everywhere people say that tastypie is better than piston.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Mibou
  • 936
  • 2
  • 13
  • 25
  • Perhaps you could utilize the global cache, a KEY/VALUE store, or a custom database model? I don't believe Tastypie supports this functionality out of box, but it should be trivial for you to add it. – Alex Hart Mar 27 '13 at 15:51
  • Thank you for your answer Alex, I also though of implementing compulsory [authentication](http://django-tastypie.readthedocs.org/en/latest/authentication_authorization.html) and add a query count field in the DB for each user which would be incremented at each query. I hoped there might be a more official / clean solution. – Mibou Mar 27 '13 at 15:57

0 Answers0