ratelimit is for python to limit the flow for web service.
from ratelimit import new_bucket
fill_interval = 500
capacity = 3
bucket = new_bucket(fill_interval, capacity)
availale = bucket.take_available(2)
if you have any problem or suggest, please contact me with my email of 819070918@qq.com.