Reference:
The flask
package provides a micro-framework for making applications with web interfaces (a.k.a "web applications").
Run a flask
application "in development" using a web server on your local machine, and/or "in production" using a remote web server hosted by a provider like Heroku. If you run it in development, you should be able to use it by visiting localhost:5000
in a browser, whereas if you run it in production, you should be able to use it by visiting the production server's URL.
First install flask
, if necessary:
pip install flask
Follow the official tutorial.
See also these example applications by the professor and previous students:
- Starter Web App
- Starter Web App w/ Google Sheets datastore
- DineCision App - includes a web form to capture user location info, then sends a corresponding request to the Yelp API and presents the response back to the user.
- Products API (Flask) - just a JSON API with no front-end interface, uses CSV datastore.
- Salad System (Flask) - includes a front-end interface, and uses an SQL datastore, although it would be possible to use a CSV datastore instead.