https://github.com/jundel-malazarte/student-attendance-system-flask
Student Attendance System Using Python Flask
https://github.com/jundel-malazarte/student-attendance-system-flask
flask flask-application flask-sqlalchemy python python3
Last synced: about 2 months ago
JSON representation
Student Attendance System Using Python Flask
- Host: GitHub
- URL: https://github.com/jundel-malazarte/student-attendance-system-flask
- Owner: Jundel-Malazarte
- Created: 2024-11-24T09:45:48.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-11-25T06:17:04.000Z (6 months ago)
- Last Synced: 2025-02-12T06:25:03.961Z (4 months ago)
- Topics: flask, flask-application, flask-sqlalchemy, python, python3
- Language: HTML
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flask Application Setup Guide
This guide walks you through setting up and running a Flask application in a virtual environment.
---
## Requirements
Ensure you have the following installed on your system:
- **Python 3.7 or higher**
- **pip** (Python package manager)---
## Setting Up the Environment
### Step 1: Create a Virtual Environment
Set up a virtual environment to isolate project dependencies:
```bash
python -m venv venvActivate the virtual environment:
```bash
.\venv\Scripts\activate### Step 2: Install Dependencies
Once the virtual environment is activated, install the required packages.Install Flask
Install Flask version 2.2.3:```bash
pip install flask==2.2.3Install Dotenv
For managing environment variables, install python-dotenv:```bash
pip install python-dotenvInstall SQLAlchemy
Install SQLAlchemy and Flask-SQLAlchemy:```bash
pip install sqlalchemy==1.4.46 flask-sqlalchemyInstall bcrypt
For secure password hashing, install bcrypt:```bash
pip install bcryptUpgrade pip
Make sure pip is updated to the latest version:```bash
python.exe -m pip install --upgrade pipInstall Werkzeug
Install Werkzeug version 2.2.2:```bash
pip install werkzeug==2.2.2---
### Running the Application
Step 1: Start the Application
Run the app using either of the following methods:Using Python:
```bash
python app.pyor
# Using Flask's Built-in Server```bash
flask run---
# Step 2: Access the Application
After running, the application will typically be available at:```bash
http://127.0.0.1:5000/---
### Project Structure
# Your project folder should look like this:.
├── app.py # Main application file
├── requirements.txt # List of dependencies
├── .env # Environment variables (not committed to source control)
├── venv/ # Virtual environment folder
├── templates/ # HTML templates
└── static/ # Static files (CSS, JS, images)---
### Additional Notes
# Activate the Virtual Environment: Always activate the virtual environment before running the application or installing new packages.
Environment Variables: Use a .env file to store sensitive configurations like secret keys or database URIs. Example .env file:```bash
FLASK_APP=app.py
FLASK_ENV=development
SECRET_KEY=your_secret_key_here
DATABASE_URI=sqlite:///app.db---
# Deactivate the Virtual Environment: When done, deactivate the virtual environment:
```bash
deactivate---
# Freeze Requirements: To create a requirements.txt file listing all dependencies, run:
```bash
pip freeze > requirements.txt---
# Install from Requirements: If sharing the project, others can install the same dependencies by running:
```bash
pip install -r requirements.txt---
### Happy Coding! 🚀