�
�Udac @` s� d Z d d l m Z m Z m Z e Z d d l Z d d l Z d d � Z
d d � Z d d � Z d d d � Z
d d d � Z d S(
s�
This module adds shared support for generic api modules
In order to use this module, include it as part of a custom
module as shown below.
The 'api' module provides the following common argument specs:
* rate limit spec
- rate: number of requests per time unit (int)
- rate_limit: time window in which the limit is applied in seconds
* retry spec
- retries: number of attempts
- retry_pause: delay between attempts in seconds
i ( t absolute_importt divisiont print_functionNc C` sA t d t d d � d t d d � � } | r= | j | � n | S( s7 Creates an argument spec for working with rate limitingt ratet typet intt
rate_limit( t dictt update( t spect arg_spec( ( s<