Limiting user access with Throttling policies: Django Rest Framework classes
Aseem Yadav (~aseemydv) |
In this talk I'll be presenting about how imposing constraints on different parts of API is done using throttling policies of DRF. For example, limiting user to access API only once per hour or 100 times or more per day using burst throttling and sustained throttling rates.
Whether it’d be an authenticated user or anonymous user, throttling policies let you restrict user access to services that are resource intensive.
Content which will be covered in this talk are as follows:
- DRF classy views
- Viewsets and Routers
- Throttling Classes
- AnonRate Throttle
- UserRate Throttle
- ScopedRate Throttle
- Basic python 3 & OOP concepts
- HTTP methods
- Django Models
- Request & Response
- Status Codes
Aseem is currently working at A10 Networks, Bengaluru. He has 5 years of experience in Python/Django, which includes building RESTful APIs to be used in Load Balancing architecture by ADCs (application delivery controllers). Nowadays, he is experimenting with Flutter SDK and uses django-rest-framework to build APIs for mobile apps.