Python + Flask Setup Guide
Categories: GitHub PagesThis guide will walk you through setting up a Flask project with local database integration.
1. Clone the Starter Repository
Use the template below:
git clone https://github.com/Open-Coding-Society/flask.git
cd flask
pip install -r requirements.txt
python app.py
2. Explore the Code
app.py
: main Flask apptemplates/
: HTML templates using Jinjastatic/
: CSS and assetsdb/
: SQLite database (or configure another)
3. Customize Your Project
- Add fields and forms to the HTML templates
- Use
request.form
to capture user input - Store data in SQLite with raw SQL or SQLAlchemy
4. Test Locally
- Visit
http://localhost:<portnumber>
in your browser. - Use tools like Postman to test routes (e.g., POST/GET).
5. Next Steps
- Add more routes (e.g., /messages, /profile)
- Create a frontend dashboard
- Prepare for deployment with cloud DBs