Skip to content

stefanosimonetto/msdocs-flask-postgresql-sample-app

 
 

Repository files navigation

Deploy a Python (Flask) web app with PostgreSQL in Azure

This is a Python web app using the Flask framework and the Azure Database for PostgreSQL relational database service. The Flask app is hosted in a fully managed Azure App Service. This app is designed to be be run locally and then deployed to Azure. For more information on how to use this web app, see the tutorial Deploy a Python (Django or Flask) web app with PostgreSQL in Azure.

If you need an Azure account, you can create on for free.

A Django sample application is also available for the article at https://github.com/Azure-Samples/msdocs-django-postgresql-sample-app.

Requirements

The requirements.txt has the following packages:

Package Description
Flask Web application framework.
SQLAlchemy Provides a database abstraction layer to communicate with PostgreSQL.
Flask-SQLAlchemy Adds SQLAlchemy support to Flask application by simplifying using SQLAlchemy. Requires SQLAlchemy.
Flask-Migrate SQLAlchemy database migrations for Flask applications using Alembic. Allows functionality parity with Django version of this sample app.
pyscopg2 PostgreSQL database adapter for Python.
python-dotenv Read key-value pairs from .env file and set them as environment variables. In this sample app, those variables describe how to connect to the database locally.

Flask's dotenv support sets environment variables automatically from an .env file.
flask_wtf Form rendering, validation, and CSRF protection for Flask with WTForms. Uses CSRFProtect extension.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 52.1%
  • Python 45.7%
  • Mako 2.2%