16 lines
328 B
Python
16 lines
328 B
Python
"""File containing throttle rates for API."""
|
|
|
|
from rest_framework.throttling import UserRateThrottle
|
|
|
|
|
|
class BurstRateThrottle(UserRateThrottle):
|
|
"""Class for burst rate throttle."""
|
|
|
|
scope = "burst"
|
|
|
|
|
|
class SustainedRateThrottle(UserRateThrottle):
|
|
"""Class for sustained rate throttle."""
|
|
|
|
scope = "sustained"
|