14 lines
353 B
Python
14 lines
353 B
Python
from app import create_app
|
|
|
|
app = create_app()
|
|
|
|
print("API routes:")
|
|
routes = []
|
|
for rule in app.url_map.iter_rules():
|
|
methods = rule.methods if rule.methods else set()
|
|
routes.append((rule.rule, ','.join(sorted(methods)), rule.endpoint))
|
|
|
|
routes.sort()
|
|
for r in routes:
|
|
if r[2].startswith('api'):
|
|
print(f'{r[0]:30} {r[1]:20} {r[2]}') |