Lhankor_Mhyさんと同じで、質問がよくわからないのですが、以下ではダメということですか?
a要素でジャンプすればそこへ飛んでくれます。
a要素での遷移でも動作するのはindex()です。
py:app.py
1from flask import Flask, render_template
2
3app = Flask(__name__)
4
5
6@app.route('/')
7def index():
8 return render_template('index.html')
9
10
11if __name__ == '__main__':
12 app.run()
html:index.html
1<!DOCTYPE html>
2<html lang="ja">
3<head>
4 <meta charset="UTF-8">
5 <title>たいとる</title>
6 <style>
7 div {
8 height: 500px;
9 background-color: #177199;
10 }
11 </style>
12</head>
13<body>
14 <a href="#top">top</a>
15 <a href="#mid">mid</a>
16 <a href="#bot">bot</a>
17 <div id="top"><p>top</p></div>
18 <div id="mid"><p>mid</p></div>
19 <div id="bot"><p>bot</p></div>
20</body>
21</html>
txt
1# 構造
2route
3│ app.py
4└─templates
5 index.html