Pycharm - Flask



PyCharm supports Flask framework development. You can easily create a new Flask project by creating new project through welcome screen. You can set the project’s location and the virtual environment and choose a template language and where the templates will be located.

Flask Framework

You can run a project by using Run -> Run ‘<project-name>’.

You can also add a new data source with this framework. Let us create a file called squema.sql and add SQL code to create some tables. PyCharm editor will recognize the files and asks you to configure a data source and set up to the database dialect.

Squema

PyCharm will let you choose the desired dialect that you want to use. You can change the properties of the SQL: Settings -> Language and Frameworks -> SQL Dialects

Language Framework

For flask editor, the easiest way to run the SQL query is to click somewhere in the query and click on the inspection window and click “Run Query into console “.

Run Query

The user interface of the Flask framework is displayed as below −

Flask Display
Advertisements