@blueprint.route("/magic/", defaults={'pattern': None}, endpoint='get')
@blueprint.route("/magic/<pattern>")
def links(pattern):
    if not pattern:
        return []

    text = Text(pattern)

    if text.path != pattern:
        return redirect(route('.links', pattern=text.path))

    return _get_matches(str(text).lower())
Get a list of all matching links.
dataset/ETHPy150Open jacebrowning/memegen/memegen/routes/magic.py/links