app = Flask(__name__)
app.add_url_rule('/<poll_key>/close', 'close', lambda **kwargs: 'close\t' +
    str(kwargs))
app.add_url_rule('/<poll_key>/<participant_key>', 'p_key', lambda **kwargs:
    'p_key\t' + str(kwargs))
client = app.test_client()
print(client.get('/example-poll-key/close').data)
print(client.get('/example-poll-key/example-participant-key').data)
Порядок сопоставления шаблонов Flask Route