brainTrain / flaskiez

playin around with flasssssssk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flaskiez

playin around with flasssssssk

Setting up

  • create virtual env
    • python3 -m venv env
  • activate virtual env
    • source env/bin/activate
    • can now type python instead of python3
  • deactivate virtual env
    • deactivate
  • install dependencies
    • pip install -r requirements.txt
  • install pre-commit hooks
    • pre-commit install
      • make sure your venv is activated when you run this
  • populate your .env file
    • run cp .env-template .env to get a .env file populated with keys that need their values added

Run

  • flask --app app run --debug

Troubleshooting

Access Denied fro running flask server

  • try chrome://net-internals/#sockets to clear local browser data for that url

Pre commit stuffs

  • install pre-commit hooks
    • pre-commit install
      • make sure your venv is activated when you run this
    • do this every time you update the .pre-commit-config.yaml file

Tools

pre-commit

  • gives yaml configurable pre-commit hook to add processers/parsers on commit
  • GitHub

Black

  • code formatter based on PEP8 rules
  • GitHub

isort

  • code formatter that sorts imports based on PEP8 rules
  • GitHub

Flake8

mypy

python-dotenv

About

playin around with flasssssssk


Languages

Language:Python 77.3%Language:HTML 22.7%