Skip to content

Boilerplate for flask api with postgres database

Notifications You must be signed in to change notification settings

dsbilling/flask-postgres-api-bp

 
 

Repository files navigation

Boilerplate for Flask using postgres database

Originally forked from this repo. Reworked, improved and added my preferences to it.

Installation

Run the following commands to set up the project:

cp .env.example .env

Install dependencies:

pip install -r requirements.txt

Install the dev dependencies:

pip install -r dev-requirements.txt

Or just install all the dependencies:

pip install -r all-requirements.txt

If you are not using a .env file

If you are not using a .env file, you need to set up the environment variables below. The example below is the defaults (no need to set them if you are using the default values):

export ENV=dev
export FLASK_APP=main

And if you are using a postgres database, you need to set up the environment variables below. The example below is the defaults (no need to set them if you are using the default values):

export DB_DIALECT=postgresql
export DB_HOST=127.0.0.1
export DB_PORT=5432
export DB_NAME=blank
export DB_USERNAME=postgres
export DB_PASSWORD=

About

Boilerplate for flask api with postgres database

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages

  • Python 92.4%
  • Mako 4.2%
  • Dockerfile 2.1%
  • Shell 1.3%