src/dirbs/api/__init__.py
def log_api_successes(response: callable) -> callable:
    """
    Makes sure we record the number of successful API responses for each API.

    Arguments:
        response: intercepted http response before dispatch to log
    Returns:
        response: same response without any change
    """
    code = response.status_code
    if 200 <= code < 300:
        statsd.incr('dirbs.api.successes.{0}.{1}'.format(_metrics_type_from_req_ctxt(request), code))
    return response

    Makes sure we record the number of successful API responses for each API.

    Arguments:
        response: intercepted http response before dispatch to log
    Returns:
        response: same response without any change
    
Makes sure we record the number of successful API responses for each API.
Makes sure we record the number of successful API responses for each API .
def log_api_successes(response: callable) -> callable:
    code = response.status_code
    if 200 <= code < 300:
        statsd.incr('dirbs.api.successes.{0}.{1}'.format(_metrics_type_from_req_ctxt(request), code))
    return response
def log_api_successes ( response : callable ) -> callable : code = response . status_code if 200 <= code < 300 : statsd . incr ( 'dirbs.api.successes.{0}.{1}' . format ( _metrics_type_from_req_ctxt ( request ) , code ) ) return response
Makes sure we record the number of successful API responses for each API.
Makes sure we record the number of successful API responses for each API .
"""
    Makes sure we record the number of successful API responses for each API.

    Arguments:
        response: intercepted http response before dispatch to log
    Returns:
        response: same response without any change
    """
same response without any change
same response without any change
response
response
callable
intercepted http response before dispatch to log
intercepted http response before dispatch to log