Company
Date Published
Author
Miguel Grinberg
Word count
1659
Language
English
Hacker News points
None

Summary

The use of `app.run()` versus `flask run` in Flask applications has evolved over time, with the latter becoming the recommended method by the Flask project. The main difference between the two is that `flask run` requires setting an environment variable to point to the application instance, while `app.run()` directly invokes the `run()` method on the application object. Both methods have their advantages and disadvantages, including differences in reloader robustness and command-line interface availability. Ultimately, there is no exclusive choice between the two methods, and both can be used together without conflict.