@app.route('<STR_LIT>')<EOL>def drip(request):
args = CaseInsensitiveDict(request.args.items())<EOL>duration = float(args.get('<STR_LIT>', <NUM_LIT:2>))<EOL>numbytes = int(args.get('<STR_LIT>', <NUM_LIT:10>))<EOL>code = int(args.get('<STR_LIT:code>', <NUM_LIT:200>))<EOL>pause = duration / numbytes<EOL>delay = float(args.get('<STR_LIT>', <NUM_LIT:0>))<EOL>if delay > <NUM_LIT:0>:<EOL><INDENT>time.sleep(delay)<EOL><DEDENT>def generate_bytes():<EOL><INDENT>for i in xrange(numbytes):<EOL><INDENT>yield u'<STR_LIT:*>'.encode('<STR_LIT:utf-8>')<EOL>time.sleep(pause)<EOL><DEDENT><DEDENT>response = Response(generate_bytes(), headers={<EOL>'<STR_LIT:Content-Type>': '<STR_LIT>',<EOL>'<STR_LIT>': str(numbytes),<EOL>})<EOL>response.status_code = code<EOL>return response<EOL>
Drips data over a duration after an optional initial delay.