@app.route('/links/<int:n>/<int:offset>')
def link_page(request, n, offset):
    n = int(n)
    offset = int(offset)

    n = min(max(1, n), 200)  # limit to between 1 and 200 links

    link = "<a href='{0}'>{1}</a> "

    html = ['<html><head><title>Links</title></head><body>']
    for i in xrange(n):
        if i == offset:
            html.append('{0} '.format(i))
        else:
            html.append(link.format(url_for('link_page', n=n, offset=i), i))
    html.append('</body></html>')

    return ''.join(html)
Generate a page containing n links to other pages which do the same.
dataset/ETHPy150Open mozillazg/bustard/tests/httpbin/core.py/link_page