Skip to content

This is a Health Asurance project bulit with flask framework for database course

Notifications You must be signed in to change notification settings

mhasabalah/Flask-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HEALTH

Project

Introduction

This is a Health Asurance project bulit with flask framework .

This project requires the following tools:

  • Python - The programming language used by Flask.
  • MySql - A relational database system.
  • Virtualenv - A tool for creating isolated Python environments.

To get started, install Python and MySql on your local computer if you don't have them already.

Getting Started

Step 1. Clone the code into a fresh folder

$ git clone https://github.com/mhasabalah/Flask-Project.git
$ cd Flask-Project

Step 2. Create a Virtual Environment and install Dependencies.

Create a new Virtual Environment for the project and activate it. If you don't have the virtualenv command yet, you can find installation instructions here. Learn more about Virtual Environments.

$ virtualenv venv
$ source venv/bin/activate

Next, we need to install the project dependencies, which are listed in requirements.txt.

(venv) $ pip install -r requirements.txt

Step 3: Create an app

Name it what you like but you'll need to specify a callback URL, which should be something like:

http://localhost:5000/

The default port for Flask apps is 5000, but you may need to update this if your setup uses a different port or if you're hosting your app somewhere besides your local machine.

Step 4: Setup your database

You need to be able to connect to a database either on your own computer (locally)) to provide the database for your app.

run sql code in MySql workbench Schema with data.sql in folder SQL

Step 5: Update environment variables and run the Server.

Add your sql config in sqlConfig.py to Health_Asurance folder

HOST = 'YOUR_HOST'
DATABASE = 'YOUR_DATABASE'
USER = 'YOUR_USER'
PASSWORD = 'YOUR_PASSWORD'

Now we're ready to start our server which is as simple as:

(venv) $ flask run

Open http://localhost:5000 to view it in your browser.

The app will automatically reload if you make changes to the code. You will see the build errors and warnings in the console.

What's Included?

  • Flask - A microframework for Python web applications
  • Flask Blueprints - A Flask extension for making modular applications
  • Flask-mySql - A Flask extension that adds ORM support for your data models.
  • Werkzeug - A Flask framework that implements WSGI for handling requests.
  • Bootstrap 5 - An open source design system for HTML, CSS, and JS.
  • Jinja2 - A templating language for Python, used by Flask.

About

This is a Health Asurance project bulit with flask framework for database course

Topics

Resources

Stars

Watchers

Forks