Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# pyrate_limiter.utils module

pyrate_limiter.utils.binary_search(items, value)

  Find the index of item in list where left.timestamp < value <= right.timestamp this is to determine the current size of some window that stretches from now back to lower-boundary = value and

  Return type:

    `int`

pyrate_limiter.utils.dedicated_sqlite_clock_connection()

pyrate_limiter.utils.id_generator(size=6, chars='ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz')
  Return type:

    `str`

pyrate_limiter.utils.validate_rate_list(rates)

  Raise false if rates are incorrectly ordered.

  Return type:

    `bool`