This is Ticketing System using Tornado Web server.
Author : Maryam Saeedmehr
Language : Python Both 2.7 - 3.6.5
For This Project You Need below Requirements :
- pyhon
- mysql
$ apt install python mysql
For runnig code.py file You Need to install below pakcage for python :
- tornado
- pymysql
$ pip install tornado
$ pip install PyMySQL
First of All Clone the Project :
$ git clone https://github.com/MaryamSaeedmehr/TicketingSystem-tornadowebserver.git
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';
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
With the default user, password, and database you can just run:
$ python code.py
Now For Sending Requests You Have 2 Options :
- Postman
- Our Client Code
Download and install Postman.
In our Project We Support Both POST & GET Method for Requesting
You Can See Example Below :
run this in the terminal
$ pip3 install requests
$ python3 client-[METHOD].py
This section is exactly the same as the above. Obviously they are different in the background. :)
/dataBase.sql
: This is Database File/server.py
: This is main python File/get.pcapng
: Wireshark Full Sniffed Packets for GET method/post.pcapng
: Wireshark Filtered Packets for POST method/client-get.py
: This is Client Code With GET Method/client-post.py
: This is Client Code With POST Method
Reach out to me at one of the following places!
- Telegram at @BitterOcean
- Gmail at maryamsaeedmehr@gmail.com