Rate Limit With A Recorder

PUBLISHED ON 2.8.2021 — DATABASE, PYTHON

You all have used rate-limiting in your apps(you know the system to prevent an API from being overwhelmed or being abused!) and if you haven’t, I strongly suggest doing so. There is a handy package specifically for Django called django-ratelimit that provides a decorator to rate-limit views. What is not covered by this package, is the ability to see what IPs or users have exceeded the ratelimit. So I have built a proxy and two handlers on top of this package(one for the cache and one for the database backend) which stores the mentioned data and enables you to look it up inside the Django admin panel.

Check it out here: django-ratelimit