Template for bootstrapping a new flask app
use (say)
npx degit github:arabidopsis/flask-template my-new-website
To create a simple layout for a new flask website.
# activate a suitable python
micromamba activate py312
# create an isolated virtual environment
python -m venv .venv
micromamba deactivate
# now activate the virtual environment
source .venv/bin/activate
# install python dependencies
poetry install --without=dev
# ** for development ** don't exclude dev
# pre-commit install
# run the flask app
flask run
You should have a fully running flask website.
See here.
First remove anything you don't want or need.
# create a empty new repo {my-new-repo} on github. Then ...
git clone git@github.com:{user}/my-new-repo.git
# copy everything including hidden files
cp -rT /path/to/my-new-website/ my-new-repo/
cd my-new-repo
git add . && git commit -m "initial commit"
git push