Event Management System Project Source Code In Python
The Event Management System Project Source Code In Python was developed using Python Programming, This Event Management System Project In Python is a console based program that is easy for the users to understand and also to manage this simple System Project.
A Event Management System In Python you can create an event, view the event you’ve created , you can booked ticket at the same time you can also view the ticket you’ve booked and also you can view the summary report of the events.
This Event Management System also includes a downloadable Project With Source Code for free, just find the downloadable source code below and click to start downloading.
Event Management System Project In Python : Features
- Create An Event
- View Events
- Book Ticket
- View Ticket
- Condition Check If Customer Already Buy Same Event Ticket
- Condition Check if All Tickets are sold Out.
- Show Overall Event Summary
By the way if you are new to python programming and you don’t know what would be the the Python IDE to use, I have here a list of Best Python IDE for Windows, Linux, Mac OS that will suit for you. I also have here How to Download and Install Latest Version of Python on Windows.
To start executing Event Management System Project Source Code In Python, make sure that you have installed Python 3.9 and PyCharm in your computer.
Event Management System Project Source Code In Python : Steps on how to run the project
Time needed: 5 minutes.
These are the steps on how to run Event Management System Project In Python
- Step 1: Download the given source code below.
First, download the given source code below and unzip the source code.
- Step 2: Import the project to your PyCharm IDE.
Next, import the source code you’ve download to your PyCharm IDE.
- Step 3: Run the project.
last, run the project with the command “py main.py”
Installed Libraries
1 2 3 |
import pickle import os import pathlib |
Complete Source Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
# Event Management System # Features : # 1. Create An Event # 2. View Events # 3. Book Ticket # 4. View Ticket # 5. Condition Check If Customer Already Buy Same Event Ticket # 6. Condition Check if All Tickets are sold Out. # 7. Show Overall Event Summary import pickle #Python pickle module is used for serializing and de-serializing a Python object structure import os import pathlib ############################### Book a Ticket Class class Ticket: name = '' email = '' event = '' reference = 200000 def bookTicket(self): self.name= input("Enter Customer Name: ") self.email = input("Enter Customer Email: ") file = pathlib.Path("events.data") if file.exists(): infile = open('events.data', 'rb') eventdetails = pickle.load(infile) self.reference = input("Enter Reference Code(10000 - 50000) : ") while True: if int(self.reference) <= 10000: print("Warning: Please Enter Valid Reference Code") self.reference = input("Enter Reference Code(10000 - 50000) : ") else: break for event in eventdetails: print("Available Event Code : " + event.eventcode + " Event Name : " + event.eventname) infile.close() self.event = input("Enter Event Code: ") def check(self): file = pathlib.Path("tickets.data") if file.exists(): infile = open('tickets.data', 'rb') ticketdetails = pickle.load(infile) for ticket in ticketdetails: if ticket.email == self.email and ticket.event == self.event: return True infile.close() def gettotalticketcount(self): file = pathlib.Path("events.data") if file.exists(): infile = open('events.data', 'rb') eventdetails = pickle.load(infile) for event in eventdetails: if event.eventcode == self.event: return int(event.eventTotalAvaibleSeat) infile.close else: return 0 def getBookedSeatCount(self): file = pathlib.Path("tickets.data") counter= 0 if file.exists(): infile = open('tickets.data', 'rb') ticketdetails = pickle.load(infile) for ticket in ticketdetails: if ticket.event == self.event: counter = counter + 1 return int(counter) return 0 ############################ Create Event Class class Event: eventname = '' eventcode = '' eventTotalAvaibleSeat = 10 def createEvent(self): self.eventname= input("Enter Event Name: ") self.eventcode = input("Enter Event Code: ") self.eventTotalAvaibleSeat = input("Enter Event Total Availble Seats: ") print("\n\n ------> Event Created!") ############################################## Main Program Modules # Book Ticket and Check Condition def bookEventTicket(): ticket = Ticket() ticket.bookTicket() if ticket.check(): print("Warning : You Already Book A Seat") elif ticket.getBookedSeatCount() >= ticket.gettotalticketcount(): print("Warning : All Ticket Sold Out") else: print("Sucess : Ticket Booked!") saveTicketDetiails(ticket) # Save Ticket Detials to File def saveTicketDetiails(ticket): file = pathlib.Path("tickets.data") if file.exists(): infile = open('tickets.data', 'rb') oldlist = pickle.load(infile) oldlist.append(ticket) infile.close() os.remove('tickets.data') else: oldlist = [ticket] outfile = open('tempTicket.data', 'wb') pickle.dump(oldlist, outfile) outfile.close() os.rename('tempTicket.data', 'tickets.data') # Display Saved Ticket Details def getTicketDetails(): file = pathlib.Path("tickets.data") if file.exists (): infile = open('tickets.data','rb') ticketdetails = pickle.load(infile) print("---------------TICKET DETAILS---------------------") print("T-Ref C-Name C-Email E-Code") for ticket in ticketdetails : print(ticket.reference,"\t",ticket.name,"\t", ticket.email, "\t",ticket.event) infile.close() print("--------------------------------------------------") input('Press Enter To Main Menu') else : print("NO TICKET RECORDS FOUND") # Create Event Module def createEvent(): event = Event() event.createEvent() saveEventDetails(event) # Save Event Details to File def saveEventDetails(event): file = pathlib.Path("events.data") if file.exists(): infile = open('events.data', 'rb') oldlist = pickle.load(infile) oldlist.append(event) infile.close() os.remove('events.data') else: oldlist = [event] outfile = open('tempevents.data', 'wb') pickle.dump(oldlist, outfile) outfile.close() os.rename('tempevents.data', 'events.data') # Display All Event Details def getEventsDetails(): file = pathlib.Path("events.data") if file.exists (): infile = open('events.data','rb') eventdetails = pickle.load(infile) print("---------------EVENT DETAILS---------------------") print("E-Name E-Code E-Total-Seats") for event in eventdetails : print(event.eventname,"\t", event.eventcode, "\t",event.eventTotalAvaibleSeat) infile.close() print("--------------------------------------------------") input('Press Enter To Main Menu') else : print("NO EVENTS RECORDS FOUND") # Display Reports About Events def getEventsSummary(): filetickets = pathlib.Path("tickets.data") if filetickets.exists(): infiletickets = open('tickets.data', 'rb') ticketdetails = pickle.load(infiletickets) fileEvents = pathlib.Path("events.data") if fileEvents.exists (): infileEvents = open('events.data','rb') eventdetails = pickle.load(infileEvents) print("---------------REPORTS---------------------") for event in eventdetails : print("\n\nEvent Name : " + event.eventname + " | Total Seats : " + event.eventTotalAvaibleSeat + " \n") for ticket in ticketdetails: if event.eventcode == ticket.event: print(ticket.reference, "\t", ticket.name, "\t", ticket.email) infileEvents.close() infiletickets.close() print("--------------------------------------------------") input('Press Enter To Main Menu') else : print("NO EVENTS RECORDS FOUND") ###################################################### Start Program ch='' num=0 while ch != 8: print("\t\t\t\t-----------------------") print("\t\t\t\tEVENT MANAGEMENT SYSTEM") print("\t\t\t\t-----------------------") print("\tMAIN MENU") print("\t1. BOOK TICKET") print("\t2. VIEW TICKET") print("\t3. CREATE EVENTS") print("\t4. VIEW EVENTS") print("\t5. SHOW SUMMARY") print("\tSelect Your Option (1-5) ") ch = input() if ch == '1': bookEventTicket() elif ch == '2': getTicketDetails() elif ch == '3': createEvent() elif ch == '4': getEventsDetails() elif ch == '5': getEventsSummary() |
Output

Run Quick Virus Scan for secure Download
Run Quick Scan for secure DownloadDownload Source Code below
Summary
This was developed using Python Programming Language, And this Simple Project With Source Code is good for the beginners or the students to enhance their logical skills in studying programming like Python.
Related Articles
- Code For Game in Python: Python Game Projects With Source Code
- Best Python Projects With Source Code 2020 FREE DOWNLOAD
- How to Make a Point of Sale In Python With Source Code 2021
- Python Code For Food Ordering System | FREE DOWNLOAD | 2020
- Inventory Management System Project in Python With Source Code
Inquiries
If you have any questions or suggestions about Event Management System Project Source Code In Python, please feel free to leave a comment below.