Basic Flask Scaffolding with MongoDB

Description

A simple Flask+Mongo scaffold to quickly get started with app development. Highlights are listed in the list below.

  • Uses python-dotenv to fetch env variables from .env file
  • Uses the Flask Mongo for Mongo DB connection
  • Uses blueprint to create a suite of roots, a sample suite called animals are provided

Prerequisites

Get Started

Poetry way

  • Install the dependencies with poetry
    $ poetry install
  • Set poetry shell
    $ poetry shell
  • Make a copy of the .env.example file and name it as .env
  • Set the db and env values in .env file
  • Run the script
    $ python app.py

Global python/virtualenv way

  • Create a virtual env
  • Use the requirements.txt file to install the dependencies
  • Make a copy of the .env.example file and name it as .env
  • Set the db and env values in .env file
  • Run python app.py to start the app