Creating Flask Project
Flask project in intended for productive development of the Flask applications. PyCharm takes care of creating the specific directory structure, and settings.
To create a Flask project, follow these steps
- On the main menu, choose File | New Project , or click the New Project button in the Welcome screen. Create New Project dialog box opens.
- In the Create New Project dialog box, specify the following:
- Project name and location.
- Project type Flask project.
- In the Python Interpreter drop-down list, select the Python SDK you want to use. If the desired interpreter is not found in the list, click the browse button to review the installed interpreters; you can specify a new one by clicking Add, and locating Python SDK in the file system. Refer to the section Configuring Available Python Interpreters.
- Necessity to install Flask. If Flask is missing in the selected interpreter, PyCharm displays an error message, and
Install Flask check box.
If Flask is installed, the check box is not shown.
- Click OK to proceed with the Flask application settings.
PyCharm creates an application and produces specific directory structure, which you can explore in the Project tool window.
Besides that, PyCharm creates a stub Python script with the name
<project name>.py, which provides a simple
"Hello, World!" example.