Boilerplate template for a Python Flask application.
├── data/
├── env/
├── static/
│ ├── css/
│ │ └── style.css
│ ├── img/
│ └── js/
├── templates/
│ └── base.html
├── tests/
├── crud.py
├── model.py
├── requirements.txt
├── seed.py
├── server.py
└── README.md
- Clone this repository:
git clone https://github.com/yvonneyeh/flask-boilerplate.git
Optional: Create and activate a virtual environment:
pip3 install virtualenv
virtualenv env
source env/bin/activate
- Install dependencies:
pip3 install -r requirements.txt
- Create environmental variables to hold your API keys in a
secrets.sh
file:
export API_KEY='{API_KEY}'
- Create your database & seed sample data:
createdb database
python3 seed.py
- Run the app on localhost:
source secrets.sh
python3 server.py