Automating Event Ticket Generation- The Tech behind the 1st Don Bosco Alumni Meet

Satish Kumar
3 min readSep 6, 2022

So, I was involved in organizing the 1st alumni meet for my school Don Bosco Academy Patna. It was an enormous task to contact our alumni from across India to participate in this great event on 4th of September 2022. We started our preparation a month ago and floated a google form for alumni to register for the event. It was done on a voluntary contribution of ₹2000 by each of our alumni. Almost 300 alumni from across India registered via the google form and 142 members along with close to 6o teachers attended the actual event. We generated tickets for all the participants and shared it to them which was used to enter the premise. I am going to give an overview of the ticket generation process below.

We filtered out people who had done their payment from the google form excel sheet. Creating more than 100 tickets individually by using Canva or any other graphic design website or tool would have been cumbersome and would have required days of work. So, I thought of automating it using python.

An initial design of the ticket was done via Canva, and a jpeg file was downloaded. Please find the design in the image below.

Initial Ticket Design

Space for participant details was left blank. I then read all the participant details in a python Data Frame. The first step involved creating 142 copies of this ticket. Please find the code for creating copies of the same design below. I used the image library PIL for this task

Creating copies of Images

We now had 142 copies of the design. From the participant details data frame, the column which needed to be printed on the ticket was extracted and converted into a python list. Then using a for loop the directory containing the 142 image files were traversed and using the Image, Image Draw, and Image Font Package the text containing all participant details were written to the image files! We had 142 tickets with a press of a button. This is the power of python! We saved almost ₹3000 by doing this! Please find the code below. The final ticket is given in the image below.

Adding Text to Images
Final Ticket
Don Bosco Academy Patna- Our beloved School

--

--

Satish Kumar

Data Scientist@Pratham Digital | Writes about AI, Data Science , Machine Learning, Culture, Social Commentary.