ondiekelijah / Login-System-with-Python-Flask-and-MySQL

Login System with Python framework Flask and MySQL database system.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Login System with Python Flask and MySQL for Beginners

Requirements(Minimum)

Download and install Python, I am using Python 3.7.2, make sure to check the box Add Python to PATH on the installation setup screen.

Download and install MySQL Community Server and MySQL Workbench, you can skip this step if you already have a MySQL server set up.

Mojor operations handled

1). Form Design — Design a login and registration form with HTML5 and CSS3.
2). Templates — Create Flask templates with HTML and Python.
3). Basic Validation — Validating form data that is sent to the server (username, password, and email).
4). Session Management — Initialize sessions and store retrieved database results.
5). MySQL Queries — Select and insert records from/in our database table.
6). Routes — Routing will allow us to point our URL's to our functions.

Requirements ,Packages used and Installation

Download and install Python, for this tutorial I'll be using Python 3.7.2, make sure to check the box Add Python to PATH on the installation setup screen

Installation

Navigate to your current project directory for this case it will be Login-System-with-Python-Flask-and-MySQL.

1 .Fork the repository and Clone it into your local machine

git clone https://github.com/{your-Github-Username }/Login-System-with-Python-Flask-and-MySQL.git

2 .Create an environment

Check to make sure you are in the same directory where you did the git clone,if not navigate to that specific directory.

Depending on your operating system,make a virtual environment to avoid messing with your machine's primary dependencies

Windows

cd Login-System-with-Python-Flask-and-MySQL
py -3 -m venv venv

macOS/Linux

cd Login-System-with-Python-Flask-and-MySQL
python3 -m venv venv

3 .Activate the environment

Windows

venv\Scripts\activate

macOS/Linux

. venv/bin/activate or source venv/bin/activate

4 .Install the requirements

Applies for windows/macOS/Linux

pip install -r requirements.txt

5. Run the application

For linux and macOS Make the run file executable by running the code

chmod 777 run

Then start the application by executing the run file

./run

On windows

set FLASK_APP=main
flask run

Image description Note:-The version of python i use will change in future , so check your python IDE with latest version and if this doesn't work comment me down.

About

Login System with Python framework Flask and MySQL database system.


Languages

Language:HTML 39.2%Language:Python 36.0%Language:CSS 24.8%