Skip to content

a flask api boilerplate with authentication using postgres

License

Notifications You must be signed in to change notification settings

bcruddy/flask-postgres-boilerplate

Repository files navigation

flask-postgres-boilerplate

a flask api boilerplate with authentication backed by postgres

app dependencies

system dependencies

you should only need to install or set these up once

python environment

  • brew install pipenv
  • brew install pyenv
  • brew install pyenv-virtualenv
  • optional for oh-my-zsh:
    • git clone https://github.com/mattberther/zsh-pyenv ~/.oh-my-zsh/custom/plugins/zsh-pyenv

    • update .zshrc

      plugins=(
          ...
          zsh-pyenv
          pipenv
      )

postgres

  • install with homebrew

    brew install postgresql@14
  • start

    brew services start postgresql@14
  • run config script

    make db-setup

starting the application

  1. checkout lastest from remote repository

  2. install/update requirements

    pipenv install
  3. check for and run migrations

    pipenv run pythom -m flask db check
    pipenv run python -m flask db upgrade # only if necessary
  4. start the server

    pipenv run python -m flask run

Tests

The code is covered by tests, to run the tests please execute

pipenv run python -m unittest

About

a flask api boilerplate with authentication using postgres

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published