Uprate, RateLimits. Dumbified.

Uprate

Thanks for giving our docs a try! we will try to make this easy to understand. If you cannot understand certain parts of the docs or feel that it is too complicated then feel free to ask questions here 😄

Quickstart

Docs are currently in the making, a rich API Reference with some examples is all we offer right now.

Example

import uprate as up

@up.ratelimit(1 / (up.Seconds(2) + up.Minutes(1)))
def oppressed():
    print("Hello World. I can only speank once every 62 seconds :(")

oppressed()

try:
    # Within 62 seconds
    oppressed()
except up.RateLimitError:
    print("I can't speak too fast ;(")

@up.ratelimit(1 / (up.Seconds(2) + up.Minutes(1)), on_retry=up.on_retry_block)
def rebellion():
    print("Hello World. I wait for my chance to speak")

rebellion()
rebellion() # blocks current thread for 62 seconds

we are working on more examples as of now to complete the docs 😅 stay tuned!

Indices and tables