- ✕This summary was generated using AI based on multiple online sources. To view the original source information, use the "Learn more" links.
Below is a Python implementation of a Library Management System using the Tkinter library for GUI and SQLite3 for database management. This system allows users to manage books, register members, issue/return books, and view records.
import sqlite3from tkinter import *import tkinter.ttk as ttkimport tkinter.messagebox as mb# Database Connectionconnector = sqlite3.connect('library.db')cursor = connector.cursor()connector.execute('''CREATE TABLE IF NOT EXISTS Library (BK_NAME TEXT,BK_ID TEXT PRIMARY KEY NOT NULL,AUTHOR_NAME TEXT,BK_STATUS TEXT,CARD_ID TEXT)''')# Functionsdef add_record():if bk_status.get() == 'Issued':card_id.set(mb.askstring('Issuer Card ID', 'Enter Issuer Card ID:'))else:card_id.set('N/A')try:connector.execute('INSERT INTO Library (BK_NAME, BK_ID, AUTHOR_NAME, BK_STATUS, CARD_ID) VALUES (?, ?, ?, ?, ?)',(bk_name.get(), bk_id.get(), author_name.get(), bk_status.get(), card_id.get()))connector.commit()display_records()mb.showinfo('Success', 'Record added successfully!')except sqlite3.IntegrityError:mb.showerror('Error', 'Book ID already exists!')def display_records():tree.delete(*tree.get_children())for row in connector.execute('SELECT * FROM Library'):tree.insert('', END, values=row)def delete_record():selected_item = tree.focus()if not selected_item:mb.showerror('Error', 'Select a record to delete!')returnvalues = tree.item(selected_item)['values']connector.execute('DELETE FROM Library WHERE BK_ID=?', (values[1],))connector.commit()display_records()# GUI Setuproot = Tk()root.title('Library Management System')root.geometry('800x500')# Variablesbk_name = StringVar()bk_id = StringVar()author_name = StringVar()bk_status = StringVar(value='Available')card_id = StringVar()# Framesleft_frame = Frame(root)left_frame.pack(side=LEFT, fill=Y)right_frame = Frame(root)right_frame.pack(side=RIGHT, fill=BOTH, expand=True)# Left Frame WidgetsLabel(left_frame, text='Book Name').pack(pady=5)Entry(left_frame, textvariable=bk_name).pack(pady=5)Label(left_frame, text='Book ID').pack(pady=5)Entry(left_frame, textvariable=bk_id).pack(pady=5)Label(left_frame, text='Author Name').pack(pady=5)Entry(left_frame, textvariable=author_name).pack(pady=5)Label(left_frame, text='Status').pack(pady=5)OptionMenu(left_frame, bk_status, 'Available', 'Issued').pack(pady=5)Button(left_frame, text='Add Record', command=add_record).pack(pady=10)# Right Frame Widgetstree = ttk.Treeview(right_frame, columns=('Book Name', 'Book ID', 'Author', 'Status', 'Card ID'), show='headings')tree.heading('Book Name', text='Book Name')tree.heading('Book ID', text='Book ID')tree.heading('Author', text='Author')tree.heading('Status', text='Status')tree.heading('Card ID', text='Card ID')tree.pack(fill=BOTH, expand=True)Button(right_frame, text='Delete Record', command=delete_record).pack(pady=10)# Initialize Records Displaydisplay_records()root.mainloop()Copied!✕Copy Library Management System Project in Python with Source Code
Library Management System Using Python with Source …
By building this Python-based Library Management System with Tkinter, we’re giving libraries a digital helping hand. Whether it’s a small local library or a big …
Library Management System using Python - GeeksforGeeks
Jul 15, 2025 · Library Management System is a project developed using Object-Oriented Programming (OOP) in Python. The goal of this project is to simulate the operations of a real-world library, including …
Library Management System Project In Python with Source Code
- Reviews: 19
- Language/s Used: Python Tkinter GUI Library
- Database: MySQL
- Project Name: library Management System Project in Python
- Login Page. The code given below is the login page of the system which can log in to the …
- Main Module. The main module of the Library Management System Project In Python and MySQL …
- Student Information. This module is for the student information that can be searched and you can …
- Book Information. This module is for the book information that can be searched and you can …
- Add New Student. In this module, you can add the information of the student. from tkinter import * …
Library Management System with Python and MySQL …
Note: This description provides an overview of the Library Management System project and its features. Depending on the project's scope and requirements, …
Library Management System Project in Python with Source Code
Library management systems are crucial in organizing and maintaining the records of books, members, and transactions in a library. In this blog post, we'll create a simple library management system using …
Library Management System Project in Python with …
Here, we will delve into the process of creating a Library Management System Project in Python, exploring its key components, and design considerations, and …
Python Library Management System [project with …
In this article, we are going to build an advanced python project Library Management System using MySQL database and Tkinter for GUI (Graphical User …
Library-Management-System | A python project to streamline library ...
Library-Management-System | A python project to streamline library management processes. A simple Library Management System built with Python and Tkinter, using SQLite for database management.
Advanced Library Management System with Source Code
Jun 25, 2025 · We’ve built an Advanced Library Management System in Python that can manage books, members, borrowing, returning, fines, and reports. You’ve got the complete source code, step-by-step …
Deep dive into Library Management System in Python with Source Code