<s> from flask import Blueprint , g <EOL> from . . errors import ValidationError , bad_request , not_found <EOL> from . . auth import auth <EOL> from . . decorators import rate_limit <EOL> api = Blueprint ( '<STR_LIT>' , __name__ ) <EOL> @ api . errorhandler ( ValidationError ) <EOL> def validation_error ( e ) : <EOL> return bad_request ( e . args [ <NUM_LIT:0> ] ) <EOL> @ api . errorhandler ( <NUM_LIT> ) <EOL> def bad_request_error ( e ) : <EOL> return bad_request ( '<STR_LIT>' ) <EOL> @ api . errorhandler ( <NUM_LIT> ) <EOL> def not_found_error ( e ) : <EOL> return not_found ( '<STR_LIT>' ) <EOL> @ api . before_request <EOL> @ rate_limit ( limit = <NUM_LIT:5> , per = <NUM_LIT:15> ) <EOL> @ auth . login_required <EOL> def before_request ( ) : <EOL> pass <EOL> @ api . after_request <EOL> def after_request ( response ) : <EOL> if hasattr ( g , '<STR_LIT>' ) : <EOL> response . headers . extend ( g . headers ) <EOL> return response <EOL> from . import students , classes , registrations </s>
