Best Flask open-source libraries and packages

Updated 1 year ago

This project uses Python3.9

Install

  • Install venv (Use the "python" or "python3" command. If neither work, use "python3.9")
python3.9 -m venv ./venv
  • Enter the virtual env
. venv/bin/activate
  • Install python dependencies
pip install -r requirements.txt
  • Install serverless globally using npm
npm install -g serverless
  • Install project dependencies (serverless plugins)
npm install
  • Create .env.local file with the environment variables
cp .env.example .env.local

Run project

  • Run the project locally
sls wsgi serve --stage local
# Add [-p NUMBER] to change the port
  • Deploy to AWS (This will require a .env file with the stage [Example, .env.dev])
sls deploy

# Or specifying the stage: dev, prod, etc
sls deploy --stage dev --verbose 

Other commands

  • Update requirements.txt
pip freeze > requirements.txt
  • Remove the project from AWS by stage
sls remove --stage dev