I have a file called apis.py which has many API's implemented using @api.route notation.eg:
@api.route('/read', methods=['GET'])
@api.route('/write', methods=['POST'])
How can get all these @api.routes paths stored somewhere? may be a hashmap / json which holds the url and the purpose of the url for eg: {"read":"/read"}. Mya be using a python script which reads all these annotations?
Just in case if you are using Flask, you can try this snippet: