BitterOcean / TicketingSystem-tornadowebserver

A Ticketing System in Python using tornado web server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ticketing System

This is Ticketing System using Tornado Web server.

Author : Maryam Saeedmehr

Language : Python Both 2.7 - 3.6.5

PreRequirements

For This Project You Need below Requirements :

  • pyhon
  • mysql
$ apt install python mysql

Requirement

For runnig code.py file You Need to install below pakcage for python :

  • tornado
  • pymysql
$ pip install tornado
$ pip install PyMySQL

install

Step0 : Cloning

First of All Clone the Project :

$ git clone https://github.com/MaryamSaeedmehr/TicketingSystem-tornadowebserver.git

Step1 : Connect to MySQL and create a database

Connect to MySQL as a user that can create databases and users:

$ mysql -u root

Create a database named "tickets":

mysql> CREATE DATABASE tickets;

Allow the "maryam" user to connect with the password "7731":

mysql> GRANT ALL PRIVILEGES ON tickets.* TO 'maryam'@'localhost' IDENTIFIED BY '7731';

Step2 : Create the tables in your new database

You can use the provided bankdb.sql file by running this command:

$ mysql --user=maryam --password=7731 --database=tickets < dataBase.sql

You can run the above command again later if you want to delete the contents of the tickets and start over after testing.

Then now you Must Put Database information in code.py from line 13 - 16

Step3 : Run the Supporting_System project

With the default user, password, and database you can just run:

$ python code.py

Usage

Now For Sending Requests You Have 2 Options :

  1. Postman
  2. Our Client Code

POSTMAN :

Download and install Postman.

In our Project We Support Both POST & GET Method for Requesting

You Can See Example Below :

GET :

Server-get

POST :

Server-post

OUR CLIENT CODE:

run this in the terminal

$ pip3 install requests
$ python3 client-[METHOD].py

GET :

client-get

POST :

This section is exactly the same as the above. Obviously they are different in the background. :)

Files

Support

Reach out to me at one of the following places!

About

A Ticketing System in Python using tornado web server


Languages

Language:Python 95.4%Language:TSQL 4.6%