Email: [email protected]
This repository contains the project for Data Representation
- My project is about the Pharmaceutical jobs in Ireland. Used this link https://www.getreskilled.com/pharmaceutical-jobs/ireland-factory-table/ to collect details for my database and hence step by step process.
- The first step was to develop the environment with Flask.
- Then server.
- Then build the CRUD.
- Launch to a web page.
This repository contains:
server: app.py
web page: newPharmajobs.html
DAO: zjobsDAO.py [zjobsDAO.py contains jobsDAO class]
DB config to edit on PA: dbconfigtemplate.py
Virtual environment requirements: requirements.txt
staticpages: login.html,jobs.html,company.html,employee.html
All old files in \oldservers
Images : have snip shots of my work with snipping tool
Link to app on pythonanywhere :http://geethakarthikesan.eu.pythonanywhere.com/ and was done with another repository https://github.com/geetharamson/deploytoPA.git
A repository on GitHub exists as a remote repository. You can clone this repository to create a local copy on your computer by following these instructions:
-
On GitHub, navigate to the main page of the repository GitHub
-
Under the repository name, click Clone or download.
-
Choose "Clone with HTTPS".Click the
Code
button which is colored green. -
Open a terminal on your machine. Change the current working directory to the location where you want the cloned directory to be made.
-
Type git clone, and then paste the URL you copied in 2 above.
https://github.com/geetharamson/DataRep2020.git
6.Press enter to clone the repository to your machine.
In the cmder create virtual environment: ((WINDOWS machine))
install python -m venv venv
To run the virtual environment
venv\Scripts\activate.bat
To see the packages needed to run this project
pip freeze
To load the file of packages
pip freeze -r requirements.txt
To install the requires packages:
pip install flask
pip install mysql-connector-python
To exit
deactivate
You can test the connection by checking the http responses with the Curl, for example:
curl -i http://localhost:5000/
The Following was outputted: C:\Users\Owner\Desktop\project (venv) λ flask run
Serving Flask app "server1" Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. Debug mode: off Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
Database = datarep
Table = pharmajobs
MySQL command to create is
create table pharmajobs(
-> JobId int PRIMARY KEY,
-> JobTitle varchar(250),
-> Company varchar(250),
-> County varchar(250),
-> NoOfVacancy int(11)
-> );
Field | Type | Null | Key | Default | Extra |
---|---|---|---|---|---|
JobId | int | NO | PRI | NULL | |
JobTitle | varchar(250) | YES | NULL | ||
Company | varchar(250) | YES | NULL | ||
County | varchar(250) | YES | NULL | ||
NoOfVacancy | int | YES | NULL |
-
Python Virtual Environment - [https://docs.python-guide.org/dev/virtualenvs/]
-
Flask User Guide - [https://flask.palletsprojects.com/en/1.1.x/#user-s-guide
-
PythonAnywhere -[https://blog.pythonanywhere.com/121/]
Geetha Karthikesan 🚀