Pharmacy
Pharmacy
Principal
ACKNOWLEDGMENT
It is with pleasure that I acknowledge my sincere
gratitude to our teacher MR. LOKENDRA SOLANKI
(PGT CS) who taught and undertook the
responsibility of teaching the subject computer
science. I have greatly benefited from his classes.
I am especially indebted to our Principal MR. AMIT
PANDYA who has always been a source of
encouragement and support and without whose
inspiration this project would not have been a
successful I would like to place on record heartfelt
thanks to him.
HARDWARES
1. Desktop Computer / Laptop
2. Mobile Phone
SOFTWARES
1. Python (latest version)
2. MySQL
3. Python connector module
4. tkinter module
5. tkbootstrap module
CONTENTS
S.NO TOPICs
1. Certificate
2. Acknowledgement
3. Hardware and Software required
4. Introduction
5. Python Source Code
6. MySQL Database
7. Outputs
8. References
INTRODUCTION
The Pharmacy Management System is a
comprehensive software application designed to
streamline the management of medicines in a
pharmacy. This project focuses on providing an
efficient, user-friendly interface for handling
essential operations such as adding new
medicines, viewing the inventory, searching for
specific medicines, and deleting outdated or
unwanted records. The system leverages Python
for backend processing, Tkinter for the graphical
user interface (GUI), and MySQL for robust
database management.
Objectives
The primary objective of this project is to facilitate
easy and accurate management of a pharmacy's
inventory. It aims to:
1. Automate Record-Keeping: Replace manual
tracking of medicine inventory with an organized
and searchable database.
2. Enhance Efficiency: Reduce time spent on
administrative tasks such as adding, searching, or
deleting medicines.
3. Improve Accuracy: Minimize errors
associated with manual record management.
4. Simplify Interaction: Provide a clean,
intuitive interface that requires minimal training to
use.
Features
1. Add Medicines: Users can add details of new
medicines, including name, company, quantity,
and price.
2. View Medicines: Displays a list of all
medicines stored in the database.
3. Search Medicines: Users can search for
medicines by name.
4. Delete Medicines: Allows users to delete
specific medicine records.
5. Responsive Design: Built with
ttkbootstrap for a modern and consistent
UI theme.
Code Structure
● Database Connection: The connect_to_db
function ensures seamless communication with
the MySQL database.
5. # Database Connection
6. def connect_to_db():
7. return mysql.connector.connect(
12.
19.
22. return
23.
24. try:
25. db = connect_to_db()
29. db.commit()
31. db.close()
32. clear_entries()
33. view_medicines()
36.
39. try:
40. db = connect_to_db()
44. db.close()
45.
46. listbox.delete(0, END)
51.
52.
56.
59. return
60.
61. try:
62. db = connect_to_db()
66. db.close()
67.
68. listbox.delete(0, END)
73.
74.
80. return
82.
83. try:
84. db = connect_to_db()
87. db.commit()
88. db.close()
93.
94.
102.
103.
108.
120.
124. # Buttons
132. # Listbox
136. view_medicines()
137. root.mainloop()
MYSQL
DATABASE
MySQL database with a table
structure:
CREATE TABLE medicines (id INT AUTO_INCREMENT
PRIMARY KEY,name VARCHAR(255),company
VARCHAR(255), quantity INT,price float);
MEDICINE TABLE
OUTPUTS
REFERENCES
1. GITHUB