(self, key, window_duration, window_offset=0, grains_per_window=1,
                 memoize_timeout=15.0, _FixedWindowRateCounter=None)
:param key: short description of the window e.g. "week"
        :param window_duration: length of the window in seconds
        :param window_offset: offset from epoch of window boundary
        :param grains_per_window: How many grains the window should be divided into
            (higher number = more accuracy)
        :param memoize_timeout: how long to memoize the information in memory in seconds
            This is the upper limit on how long a `get` could return a stale value.
def __init__(self, key, window_duration, window_offset=0, grains_per_window=1,
                 memoize_timeout=15.0, _FixedWindowRateCounter=None):
        """

        :param key: short description of the window e.g. "week"
        :param window_duration: length of the window in seconds
        :param window_offset: offset from epoch of window boundary
        :param grains_per_window: How many grains the window should be divided into
            (higher number = more accuracy)
        :param memoize_timeout: how long to memoize the information in memory in seconds
            This is the upper limit on how long a `get` could return a stale value.
        """
        _FixedWindowRateCounter = _FixedWindowRateCounter or FixedWindowRateCounter
        self.key = key
        self.window_duration = window_duration
        self.window_offset = window_offset
        self.grains_per_window = grains_per_window
        self.memoize_timeout = memoize_timeout
        self.grain_duration = window_duration / grains_per_window
        self.grain_counter = _FixedWindowRateCounter(
            key=key,
            window_duration=self.grain_duration,
            window_offset=window_offset,
            keep_windows=grains_per_window + 1,
            memoize_timeout=memoize_timeout
        )
def __init__ ( self , key , window_duration , window_offset = 0 , grains_per_window = 1 , memoize_timeout = 15.0 , _FixedWindowRateCounter = None ) : _FixedWindowRateCounter = _FixedWindowRateCounter or FixedWindowRateCounter self . key = key self . window_duration = window_duration self . window_offset = window_offset self . grains_per_window = grains_per_window self . memoize_timeout = memoize_timeout self . grain_duration = window_duration / grains_per_window self . grain_counter = _FixedWindowRateCounter ( key = key , window_duration = self . grain_duration , window_offset = window_offset , keep_windows = grains_per_window + 1 , memoize_timeout = memoize_timeout )