HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

flask — A general utility script for Flask applications. Loads the application defined in the `$FLASK_APP` e

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandflaskforcligeneralscriptutility

Problem

How to use the flask command: A general utility script for Flask applications. Loads the application defined in the $FLASK_APP environment variable. More information: <https://flask.palletsprojects.com/en/stable/cli/>.

Solution

flask — A general utility script for Flask applications. Loads the application defined in the $FLASK_APP environment variable. More information: <https://flask.palletsprojects.com/en/stable/cli/>.

Run a development server:
flask run


Show the routes for the app:
flask routes


Run a Python interactive shell in the app's context:
flask shell

Code Snippets

Run a development server

flask run

Show the routes for the app

flask routes

Run a Python interactive shell in the app's context

flask shell

Context

tldr-pages: common/flask

Revisions (0)

No revisions yet.