second commit

This commit is contained in:
2024-12-27 22:31:23 +09:00
parent 2353324570
commit 10a0f110ca
8819 changed files with 1307198 additions and 28 deletions

View File

@ -0,0 +1,15 @@
class RateLimitException(Exception):
'''
Rate limit exception class.
'''
def __init__(self, message, period_remaining):
'''
Custom exception raise when the number of function invocations exceeds
that imposed by a rate limit. Additionally the exception is aware of
the remaining time period after which the rate limit is reset.
:param string message: Custom exception message.
:param float period_remaining: The time remaining until the rate limit is reset.
'''
super(RateLimitException, self).__init__(message)
self.period_remaining = period_remaining