June 29, 2015

How to know what Endpoints any Werkzeug webapp Exposes

The code above lists your flask endpoints along with their handlers in json.

2 comments:

  1. i must ask where your importing the `has_no_empty_params` function from? Im sure its not a python builtin. Do you realize that this snippet will work for no one without that info? Thanks.

    ReplyDelete
  2. ahh, much better, i was hoping i could give it a try, you know i realized that if you want the urls with parameters the value of `rule.rule` is basically the endpoint you want with the route params in it. also it could help to add `rule.methods` to the results, so you know what methods each endpoint takes as well. good job.

    ReplyDelete