Skip to content

oski214/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:

PackageDescription
FlaskWeb application framework.
SQLAlchemyProvides a database abstraction layer to communicate with PostgreSQL.
Flask-SQLAlchemyAdds SQLAlchemy support to Flask application by simplifying using SQLAlchemy. Requires SQLAlchemy.
Flask-MigrateSQLAlchemy database migrations for Flask applications using Alembic. Allows functionality parity with Django version of this sample app.
pyscopg2PostgreSQL database adapter for Python.
python-dotenvRead 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_wtfForm rendering, validation, and CSRF protection for Flask with WTForms. Uses CSRFProtect extension.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Bicep72.7%
  • HTML14.3%
  • Python11.7%
  • Other1.3%