project documentation(book recommendation system)
project documentation(book recommendation system)
PROJECT REPORT
ON
TO
(MCA-I, SEM.-I)
BY
1
CERTIFICATE
This is to certify that, the project entitled
“BookRecommendation”, being submitted for the partial fulfilment of
the degree of Master of Computer Application by her/him to Sinhgad
Institute of Management and Computer Application affiliated to
Savitribai Phule Pune University, Pune is the result of the original work
completed by Gautam Ganesh Velu under the guidance of Dr. Poonam
Sawant
To the best of our knowledge and belief, this work has not been
previously submitted by the award of any degree or diploma of
Savitribai Phule Pune University or any other University.
PLACE: PUNE
DATE: / /
Dr. Poonam Prof. Navanath Dr. Rajesh Gawali Dr. Vijaya Puranik
Sawant Choudhari
Internal Examiner
2
DECLARATION
DATE: / / (Student)
3
ACKNOWLEDGEMENT
4
Book
Recommendation
System
5
Sr. NO INDEX PG.NO
1. Introduction 8
1.1 Abstract 9
1.2 Existing System and Need for System 10
1.3 Objective Of Project 12
1.4 Future Scope 14
1.5 System Overview 15
1.6 Requirement And Specification 16
2. Proposed System 17
2.1 Study of Similar Systems (If required research paper can be 17
included)
2.2 Feasibility Study 21
2.3 Objectives of Proposed Project 25
3. Analysis and Design 27
3.1 System requirements (Functional and Non-Functional 27
requirements)
3.2 Use Case Analysis 29
3.3 Architectural Design 30
3.4 Class Diagram 30
3.5 Sequence Diagram 31
3.6 Flow Chart 32
3.7 Component design 33
4. Coding 34
4.1 Algorithms 35
4.2 Code Snippets 38
5. Testing 50
5.1 Unit testing 50
5.2 Integration Testing 51
5.3 System Testing 51
5.4 User Acceptance Testing(UAT) 52
5.5 Performance Test 52
5.6 Tool used 52
5.7 Test Case 53
6. Implementation 54
6
7. Limitations of Proposed system 58
8. Proposed Enhancements 61
9. Bibliography 65
10. User Manual (All screens with proper
description/purpose Details 68
about validations related to data to be entered.)
11. Conclusion 76
1.Introduction
7
Python Project to Recommend Books Using a JSON Database
This project involves the development of a book recommendation
system using Python and Tkinter for the GUI. The tool is designed to
recommend books based on user preferences and search queries. The
system fetches data from the Google Books API and displays the top 5
related books.
1.1 ABSTRACT
8
This report presents the development of a Book Recommendation
System utilizing Python and Tkinter for the GUI. The project aims to
provide an efficient and user-friendly platform for users to discover
books based on their preferences. Leveraging the Google Books API,
the system retrieves comprehensive data on books, including details
such as authors, publishers, publication dates, and ratings. The GUI
displays the top 5 related books in a visually appealing manner, with
additional optional features like publication dates and ratings to enhance
user experience.
11
The primary objective of this project is to create a system that not only
recommends books based on user queries but also provides
comprehensive information about each recommended book. By
integrating various data points such as author names, publication dates,
and ratings, the system offers a rich and informative user experience.
This project aims to enhance the traditional book search process,
making it more efficient and enjoyable for users.
The system is designed to fetch and display the top 5 books related to
the user's search query. Each recommendation is presented in a separate
frame within the GUI, showcasing key details such as the book cover,
title, author, and optional features like the publication date and rating.
This structured presentation helps users quickly assess and compare the
recommended books.
Our approach to developing this system involves several key
components:
Data Retrieval: Utilizing the Google Books API, the system
retrieves detailed information about books matching the user's
search query. The API provides a wealth of data, including
author names, subtitles, publishers, publication dates,
descriptions, page counts, print types, categories, images,
languages, countries, list prices, buy links, web reader links, and
search info.
12
GUI Development: Using Python's Tkinter library, the system
features a clean and intuitive interface. The main window is
divided into five frames, each dedicated to one of the top 5
recommended books. Users can easily navigate the interface,
view detailed information, and make informed decisions about
which books to explore further.
13
1.4 FUTURE SCOPE
Enhanced Recommendation Algorithm:
Integrating advanced recommendation algorithms such as collaborative
filtering and content-based filtering to improve the accuracy of
recommendations.
User Profiles:
Implementing user profiles to store user preferences and improve
personalized recommendations.
14
1.5 SYSTEM OVERVIEW
Main Features:
Data Retrieval:
The system retrieves data from the Google Books API, which includes
details such as author names, subtitles, publishers, publication dates,
descriptions, page counts, print types, categories, images, languages,
countries, list prices, buy links, web reader links, and search info.
Packages Used:
Pillow == 11.0.0
Requests == 2.32.3
pytk == 0.0.2.1
15
1.6 Requirement and Specification
Hardware Requirements:
PROCESSOR : Intel(R) Core (TM)i5-4300G1
[email protected], 2501 MHz
HARD DISK : 500 MB
RAM : 8 GB
Software Requirements:
OPERATING Window7/8/10/11 , Linux, Mac etc
SYSTEM:
PROGRAMMIN Python (version 3.10.5)
G LANGUAGE :
IDE USED : Visual Studio
16
2.Proposed System
2.1 Study Of Similar Systems
The Book Recommendation System project falls into a well-researched
domain where similar systems have been developed for recommending
books, movies, music, and other media content. These systems typically
use algorithms and databases to analyze user preferences and suggest
relevant items. Below is a study of similar systems, outlining their key
features, technologies used, and how they compare to the proposed
Book Recommendation System.
20
2.2 Feasability Study
The feasibility study evaluates the technical, operational, economic, and
scheduling aspects of implementing the Book Recommendation System
to ensure its practicality and success.
1. Technical Feasibility
This aspect determines whether the project is technically possible with
available tools and resources.
Platform and Tools:
o The system uses Python's Tkinter library for the GUI.
o Integration with the Google Books API ensures access to a
vast library of books.
o Additional libraries like requests, Pillow, and urllib.parse
enhance functionality (e.g., HTTP requests, image handling).
Technical Requirements:
o A system with Python installed and basic libraries available.
o Access to the internet for API integration.
Conclusion:
o The project is technically feasible as it uses mature, well-
documented tools and APIs that are widely supported.
21
2. Operational Feasibility
This aspect assesses whether the system meets user needs and how
efficiently it can be operated.
Ease of Use:
o The graphical interface is simple and intuitive, making it
accessible for non-technical users.
o Features such as search filters (e.g., ratings, publication dates)
enhance user interaction.
Reliability:
o Real-time data fetching ensures the system remains relevant
and up-to-date.
o Error handling mechanisms (e.g., API failure notifications)
improve usability.
User Acceptance:
o The system is tailored to meet user demands for quick and
accurate book recommendations, likely ensuring high
adoption rates.
Conclusion:
o The project is operationally feasible as it aligns with user
expectations and provides a seamless experience.
22
3. Economic Feasibility
This aspect evaluates whether the project is cost-effective in terms of
development and maintenance.
Cost Factors:
o Development Costs: Minimal, as the system uses free
libraries and APIs.
o Maintenance Costs: Low, requiring only periodic updates
and API monitoring.
o Hardware Requirements: The system can run on standard
hardware with no specialized needs.
Benefit Analysis:
o Time saved for users searching for books across multiple
platforms.
o Improved user engagement through an interactive, visually
appealing GUI.
Conclusion:
o The system is economically feasible due to its low
development and maintenance costs and high potential
benefits.
23
4. Scheduling Feasibility
This aspect evaluates whether the project can be completed within a
reasonable timeframe.
Estimated Time:
o Requirement Gathering and Design: 1-2 weeks.
o Development: 3-4 weeks, including GUI design and API
integration.
o Testing and Debugging: 1-2 weeks.
o Deployment: Less than 1 week.
Conclusion:
o The project can be completed within 6-8 weeks, making it
feasible in terms of scheduling.
24
2.3 Objective of the Proposed System
The objective of the proposed Book Recommendation System is to
provide an efficient, user-friendly, and visually appealing platform for
users to search for and discover books based on their preferences. The
system aims to enhance the book recommendation experience by
integrating advanced search capabilities, real-time data, and
customizable filters. Specifically, the objectives are:
Primary Objectives
1. Streamline Book Discovery
Enable users to quickly search for books using keywords such as
titles, authors, or genres, reducing the time and effort involved in
manual searches.
2. Provide Dynamic Recommendations
Utilize the Google Books API to fetch up-to-date book
information, ensuring the recommendations are relevant and
current.
3. Enhance User Experience
Offer a clean and intuitive graphical interface (GUI) that is easy to
navigate for users of all technical backgrounds.
25
Secondary Objectives
4. Incorporate Customization
Provide filtering options, such as publication dates and ratings,
allowing users to refine their search results according to their
preferences.
5. Deliver Visual Appeal
Display book covers, titles, and metadata in a visually engaging
format to improve user interaction and satisfaction.
6. Automate the Recommendation Process
Automatically retrieve, process, and display book data to save
user effort and provide a seamless experience.
7. Ensure Scalability
Design the system to be extensible, enabling future integration
with additional APIs, user accounts, and features like reviews or
wish lists
26
3.Analysis and Design
The analysis phase identifies the requirements and key aspects of the
system to ensure its effectiveness and user satisfaction.
Non-Functional Requirements
27
1. Usability:
o The GUI must be simple and intuitive, suitable for users of all
technical levels.
2. Performance:
o The system must fetch and display results within a few
seconds.
3. Scalability:
o The system should be extensible to support additional
features, such as user accounts or integration with other APIs.
4. Maintainability:
o Code should be modular and well-documented for easy
updates and debugging.
Design
29
The design phase outlines the architecture, system components, and
interactions.
30
3.5 sequence Diagram
31
3.6 Flow chart
32
3.7 Component Design
Input Component:
o Entry box for user to input search keywords.
Processing Component:
o fetch_book_details() function to query Google Books API.
o apply_filters() function to refine results.
Output Component:
o Dynamic frames displaying book covers, titles, and metadata.
o Error message popups for invalid API responses.
33
4.Coding
4.1 Algorithms
1. Initialization
1. Start the program and initialize the GUI components using the
Tkinter library.
2. Set up global variables and data structures:
o inc to track the current book being displayed.
o check_var and check_var2 for filter toggles (Publish Date,
Rating).
2. User Interaction
2.1 Search Input
1. Wait for the user to input a search query in the entry box.
2. On "Search" button click:
o Clear previous results (clear_results function).
o Validate the input.
3. API Integration
1. Construct a request to the Google Books API using the entered
query.
o Encode the query to ensure compatibility with the API.
o URL format: https://www.googleapis.com/books/v1/volumes?
q=<search_query>&maxResults=5.
34
2. Send a GET request to the API.
3. Check the response:
o If successful (status_code == 200), parse the JSON data.
o If failed, display an error message to the user.
4. Data Processing
1. Iterate through the response data to extract book information:
o Metadata: Title, Author(s), Published Date, Rating.
o Images: Fetch thumbnail URLs.
2. Call fetch_information() for each book:
o Update the GUI with the title, image, publication date, and
rating.
o Use the Pillow library to process and resize images.
5. Display Results
1. Populate the GUI frames with book details:
o Display book covers and metadata in their respective slots.
o If filters are toggled (Publish Date, Rating), update the frames
accordingly.
6. Filters
1. Check the state of filters (check_var and check_var2):
35
o If enabled, show the Publish Date and/or Rating.
o If disabled, hide the corresponding fields.
2. Re-render the GUI dynamically based on filter changes.
7. Error Handling
1. If no results are found or the API fails:
o Display a friendly error message (e.g., "No results found" or
"Failed to fetch data").
2. Catch exceptions during the API call to prevent crashes.
9. Repeat
Wait for further user actions (e.g., new searches, filter updates).
Repeat the process starting from Step 2.
36
2. Wait for user input.
3. On search:
o Clear old results.
o Fetch new data via API.
o Update the GUI with results.
4. Apply filters if needed.
5. Handle errors gracefully.
6. Exit on user request
class Request:
def __init__(self, method, args):
self.args = args
self.method = method
inc = 0
def fetch_information(title, poster, date, rating):
global inc
inc += 1
text[f'a{inc}'].config(text=title)
if check_var.get():
text2[f'a{inc}{inc}'].config(text=date)
else:
text2[f'a{inc}{inc}'].config(text="")
if check_var2.get():
38
text3[f'a{inc}{inc}{inc}'].config(text=rating)
else:
text3[f'a{inc}{inc}{inc}'].config(text="")
response = requests.get(poster)
img_data = response.content
img = Image.open(BytesIO(img_data))
resized_image = img.resize((140, 200))
photo2 = ImageTk.PhotoImage(resized_image)
image[f'b{inc}'].config(image=photo2)
image[f'b{inc}'].image = photo2
def clear_results():
global inc
inc = 0
for i in range(1, 6):
text[f'a{i}'].config(text="")
text2[f'a{i}{i}'].config(text="")
text3[f'a{i}{i}{i}'].config(text="")
image[f'b{i}'].config(image="")
def search():
global inc
39
clear_results() # Clear previous results
request = Request('GET', {'search': Search.get()})
if request.method == 'GET':
search = urllib.parse.quote(request.args.get('search', ''))
url = f"https://www.googleapis.com/books/v1/volumes?
q={search}&maxResults=5"
response = requests.get(url)
if response.status_code == 200:
data = response.json()
for item in data.get('items', []):
volume_info = item.get('volumeInfo', {})
title = volume_info.get('title', 'N/A')
publisher = volume_info.get('publisher', 'N/A')
published_date = volume_info.get('publishedDate', 'N/A')
author = volume_info.get('authors', ['N/A'])
rating = volume_info.get('averageRating', 'N/A')
image_links = volume_info.get('imageLinks', {})
image = image_links.get('thumbnail', 'N/A')
# print(title)
# print(publisher)
# print(published_date)
40
# print(author)
# print(rating)
# print(image)
41
def show_menu(event):
# Display the menu at the mouse position
menu.post(event.x_root, event.y_root)
root = Tk()
root.title("Book Recommender System")
root.geometry("1250x700")
root.config(bg="#111119")
root.resizable(False, False)
# Icon
icon_image = PhotoImage(file="Images/icon.png")
root.iconphoto(False, icon_image)
# Background image
heading_image = PhotoImage(file="Images/background.png")
Label(root, image=heading_image, bg="#111119").place(x=-2, y=-2)
# Logo
logo_image = PhotoImage(file="Images/booklogo.png")
Label(root, image=logo_image, bg="#0099ff").place(x=300, y=80)
42
# Heading
heading = Label(root, text="BOOK RECOMMENDATION",
font=("Helvetica", 30, "bold"), fg="white", bg="#0099ff")
heading.place(x=400, y=85)
# Search Button
recommend_button_image = PhotoImage(file="Images/Search.png")
recommend_button = Button(root, image=recommend_button_image,
bg="#0099ff", bd=0, activebackground="#252532", cursor="hand2",
command=search)
recommend_button.place(x=860, y=169)
# Setting Button
Setting_image = PhotoImage(file="Images/setting.png")
43
setting = Button(root, image=Setting_image, bd=0, cursor="hand2",
activebackground="#0099ff", bg="#0099ff")
setting.place(x=1050, y=175)
setting.bind('<Button-1>', show_menu)
# Logout Button
Logout_image = PhotoImage(file="Images/logout.png")
Button(root, image=Logout_image, bg="#0099ff",
cursor="hand1",
command=lambda: root.destroy()).place(x=1150, y=20)
# First Frame
frame1 = Frame(root, width=150, height=240, bg="white")
frame2 = Frame(root, width=150, height=240, bg="white")
frame3 = Frame(root, width=150, height=240, bg="white")
44
frame4 = Frame(root, width=150, height=240, bg="white")
frame5 = Frame(root, width=150, height=240, bg="white")
frame1.place(x=160, y=350)
frame2.place(x=360, y=350)
frame3.place(x=560, y=350)
frame4.place(x=760, y=350)
frame5.place(x=960, y=350)
# Book Title
text = {'a1': Label(frame1, text="Book Title", font=("arial", 10),
fg="green"),
'a2': Label(frame2, text="Book Title", font=("arial", 10), fg="green"),
'a3': Label(frame3, text="Book Title", font=("arial", 10), fg="green"),
'a4': Label(frame4, text="Book Title", font=("arial", 10), fg="green"),
'a5': Label(frame5, text="Book Title", font=("arial", 10), fg="green")}
text['a1'].place(x=10, y=4)
text['a2'].place(x=10, y=4)
text['a3'].place(x=10, y=4)
text['a4'].place(x=10, y=4)
text['a5'].place(x=10, y=4)
# Second Frame
frame11 = Frame(root, width=150, height=50, bg="#e6e6e6")
frame22 = Frame(root, width=150, height=50, bg="#e6e6e6")
frame33 = Frame(root, width=150, height=50, bg="#e6e6e6")
frame44 = Frame(root, width=150, height=50, bg="#e6e6e6")
frame55 = Frame(root, width=150, height=50, bg="#e6e6e6")
# Date
text2 = {'a11': Label(frame11, text="date", fg="red", font=("arial", 10),
bg="#e6e6e6"),
'a22': Label(frame22, text="date", fg="red", font=("arial", 10),
bg="#e6e6e6"),
'a33': Label(frame33, text="date", fg="red", font=("arial", 10),
bg="#e6e6e6"),
'a44': Label(frame44, text="date", fg="red", font=("arial", 10),
bg="#e6e6e6"),
46
'a55': Label(frame55, text="date", fg="red", font=("arial", 10),
bg="#e6e6e6")}
text2['a11'].place(x=10, y=4)
text2['a22'].place(x=10, y=4)
text2['a33'].place(x=10, y=4)
text2['a44'].place(x=10, y=4)
text2['a55'].place(x=10, y=4)
# Rating
text3 = {'a111': Label(frame11, text="rating", font=("arial", 10),
bg="#e6e6e6"),
'a222': Label(frame22, text="rating", font=("arial", 10),
bg="#e6e6e6"),
'a333': Label(frame33, text="rating", font=("arial", 10),
bg="#e6e6e6"),
'a444': Label(frame44, text="rating", font=("arial", 10),
bg="#e6e6e6"),
'a555': Label(frame55, text="rating", font=("arial", 10),
bg="#e6e6e6")}
text3['a111'].place(x=20, y=30)
text3['a222'].place(x=20, y=30)
text3['a333'].place(x=20, y=30)
text3['a444'].place(x=20, y=30)
text3['a555'].place(x=20, y=30)
root.mainloop()
47
try.py :
import requests
import urllib.parse
class Request:
def __init__(self, method, args):
self.args = args
self.method = method
if request.method == 'GET':
search = urllib.parse.quote(request.args.get('search', ''))
url = f"https://www.googleapis.com/books/v1/volumes?
q={search}&maxResults=1"
response = requests.get(url)
print("Title:", title)
print("Publisher:", publisher)
print("Published Date:", published_date)
print("Author(s):", ", ".join(author))
print("Rating:", rating)
print("Image URL:", image)
else:
print(f"Failed to fetch data. Status code: {response.status_code}")
49
5.testing
The testing phase ensures that the Book Recommendation System is
functional, reliable, and meets the specified requirements. Various
testing methodologies, including unit testing, integration testing, and
user acceptance testing, are used.
50
5.2 Integration Testing
Objective: To test the interaction between different components.
Scenarios:
1. GUI and API: Ensure the search query from the GUI is correctly sent
to the API, and the results are displayed.
2. Dynamic Updates: Verify that search results and filters dynamically
update the GUI without errors.
3. Error Propagation: Test how API errors (e.g., invalid queries or server
failures) propagate to the GUI.
51
5.4 User Acceptance Testing (UAT)
Objective: To ensure the system meets user expectations and is intuitive.
Methodology:
1. Select users to perform searches and apply filters.
2. Collect feedback on system usability, response times, and visual
appeal.
3. Verify that users can easily interpret error messages and navigate the
interface.
52
5.8 Test case
Test
Case Test Case Description Input Expected Output Result
ID
Display top 5
Verify search
TC01 "Harry Potter" results with titles, Pass/Fail
functionality
covers, ratings
Display filtered
Verify GUI updates
TC04 Ratings > 4.0 results based on Pass/Fail
after applying filters
rating criteria
Display error
Verify handling of API Network
TC05 message: "Failed to Pass/Fail
failure disconnected
fetch data."
GUI handles
Test responsiveness of Click "Search"
TC06 updates without Pass/Fail
GUI multiple times
crashing
Display resized
Verify book image Fetch books with
TC07 images without Pass/Fail
rendering covers
distortion
6. IMPLEMENTATION
53
Data Loading and Pre-processing:
The system fetches data from the Google Books API using the search
query provided by the user. The retrieved data is processed and stored in
a JSON format for efficient handling and display.
GUI Development:
The GUI is developed using Python's Tkinter library, providing a user-
friendly interface for searching and displaying book recommendations.
The main window consists of five frames, each displaying details of one
recommended book.
Feature Integration:
Link: https://www.googleapis.com/books/v1/volumes?
q={search}&maxResults=5
54
using Tkinter
Python offers multiple options for developing GUI (Graphical User
Interface). Out of all the GUI methods, tkinter is the most commonly
used methods. It is a standard python interface to the Tk GUI toolkit
shipped with Python. Python with tkinter outputs the fastest and easiest
way to create the GUI applications. Now, it’s up to the imagination or
necessity of developer, what he/she wants to develop using this toolkit.
To create a tkinter:
Importing the module - tkinter
Create the main window (container)
Add any number of widgets to the main window.
Apply the event Tigger on the main window.
55
Book Recommendation Application
How to start:
It is a quite easy work with python; in this method we have used
few advance libraries like requests and pillow
56
It is the first interface of Book Recommendation Application, which is
completely design with the help of python tkinter.
It also contains a Logout button with the help of which we can control
user logout and with setting button we can check author name, rating etc
of book.
Advantages:
User-Friendly Interface
Efficient Data Retrieval
User can choose to display additional information such as
publication dates and ratings, allowing for more tailored
experience.
System displays book covers and other details in a visually
appealing format, enhacing the user experience.
Disadvantages:
Dependency on External API
Limited by API Results
Data Privacy Concerns
Scalability Limitations
57
7. Limitations of Proposed System
Despite its benefits, the proposed system has the following limitations:
1. Dependency on External APIs
The system relies entirely on the Google Books API for fetching
book data. If the API is unavailable or experiences downtime, the
system cannot function.
Changes in the API structure or policies (e.g., rate limits or
deprecated endpoints) may require system updates.
2. Limited Personalization
The system does not provide personalized recommendations based
on user history, preferences, or behavioral data.
Advanced features like collaborative or content-based filtering are
not implemented.
58
4. Performance Constraints
The system fetches data for a maximum of five books per search,
which may not satisfy users looking for a broader range of
recommendations.
Response times depend on the speed of the API and internet
connectivity, which may cause delays.
7. No User Authentication
The system lacks user authentication and account management
features, which could limit personalization and restrict the ability
to save user-specific searches or preferences.
59
8. Limited Scalability
The current design supports only basic features and is not
optimized for handling large volumes of data or concurrent users.
Expanding the system to include advanced recommendation
algorithms or integrations may require significant redesign.
60
8. Proposed Enhancements
To improve the functionality, user experience, and scalability of the
system, the following enhancements are proposed:
1. Personalized Recommendations
Feature: Implement user accounts with personalized preferences.
o Users can save their favorite genres, authors, or previous
searches.
o Recommendations are tailored based on user history.
Benefit: Enhances user satisfaction by providing more relevant
suggestions.
62
7. Offline Mode
Feature: Cache previously searched data to enable offline access to
book details.
Benefit: Improves usability for users with limited internet
connectivity.
8. Multi-Language Support
Feature: Provide language localization options for the GUI.
Benefit: Expands the system’s usability to non-English-speaking
users.
63
10. AI-Powered Suggestions
Feature:
o Use machine learning algorithms to suggest books based on
user preferences and patterns.
o Recommend trending books or similar books based on user
selections.
Benefit: Elevates the recommendation system's intelligence and
adaptability.
64
9. Bibliography
Below is the list of resources and references used for the development,
research, and conceptualization of the Book Recommendation System:
65
Web Resources
1. Google Books API Documentation
o Official documentation for implementing and using the API
for fetching book data.
o https://developers.google.com/books
2. Tkinter Documentation (Python)
o Resource for GUI development with the Tkinter library.
o https://docs.python.org/3/library/tkinter.html
3. Pillow (PIL Fork) Documentation
o Official guide for image processing and resizing in Python.
o https://pillow.readthedocs.io
4. Stack Overflow
o Community-based solutions for common programming
challenges and debugging.
o https://stackoverflow.com
5. GeeksforGeeks
o Tutorials and code snippets for Tkinter and API integration.
o https://www.geeksforgeeks.org
66
Online Tutorials and Videos
1. YouTube - Python GUI Tutorials
o Tutorials on building GUIs with Tkinter and integrating APIs
in Python.
2. Udemy Course - "Python Programming with APIs"
o Comprehensive course on creating Python applications with
third-party APIs.
Tools Used
1. Postman
o For testing the Google Books API and verifying data
responses.
o https://www.postman.com
2. PLANTUML
o For creating UML diagrams, sequence diagrams, and
flowcharts.
o https://plantuml.com
67
10. User Manual
This user manual provides a comprehensive guide to using the Book
Recommendation System, including screen descriptions, data
validations, and the purpose of each feature.
1. Home Screen
Description:
Purpose: Provides the main interface for users to search for books.
Elements:
o Search Bar: An input field where users can enter the title,
author, or keyword of the book.
o Search Button: Executes the search query and fetches data
from the Google Books API.
o Settings Button: Opens a menu to enable/disable filters for
publication date and rating.
o Logout Button: Allows users to exit the application.
Validations:
Search Input:
o Must not be empty. If left blank, an error message is
displayed: "Please enter a valid query."
o Special characters or invalid queries (e.g., "!!!###") return a
"No results found" message.
68
User Interaction:
1. Enter a search term (e.g., "Harry Potter") in the search bar.
2. Click the "Search" button to fetch results.
3. Use the Settings menu to apply filters if needed.
2. Results Screen
Description:
Purpose: Displays the top 5 recommended books based on the
search query.
Elements:
o Book Cover: Thumbnail image of each book fetched from the
API.
o Book Title: Title of the book displayed below the cover.
o Publication Date (Optional): Displayed only if the "Publish
Date" filter is enabled.
o Rating (Optional): Displayed only if the "Rating" filter is
enabled.
Validations:
The system ensures that all data (title, cover, date, rating) is fetched
and displayed accurately.
If any field is unavailable (e.g., no rating), it will display "N/A"
instead.
69
User Interaction:
View the displayed books and their metadata.
If filters are applied, the interface updates dynamically to include
or exclude date and rating information.
3. Settings Menu
Description:
Purpose: Provides options to customize the results display by
enabling/disabling filters.
Elements:
o Checkbox for Publish Date: Toggles the display of the
book's publication date.
o Checkbox for Rating: Toggles the display of the book's
rating.
Validations:
The filters are dynamically applied when selected; no additional
input is required.
User Interaction:
1. Click the "Settings" button.
2. Enable/disable the desired filters (e.g., check/uncheck "Publish
Date").
3. View the updated results with the applied filters.
70
4. Error Handling
Description:
Purpose: Ensures user-friendly error messages for invalid inputs or
system issues.
Scenarios:
o Invalid Search Query: If the search bar is left empty, the
system displays an alert: "Please enter a valid query."
o API Failure: If the API fails to respond or no results are
found, the system displays: "Failed to fetch data from Google
Books API."
o Network Issues: If there’s no internet connection, the system
alerts the user.
71
Screenshots with Description
1. Home Screen
Screenshot: Displays the main interface with the search bar,
"Search" button, settings, and logout options.
Purpose: To initiate a book search.
72
2. Results Screen
Screenshot: Shows the search results with book covers, titles, and
optional filters (publish date, rating).
Purpose: To display fetched book data.
73
3. Settings Menu
Screenshot: Displays checkboxes for enabling/disabling filters.
Purpose: Allows users to customize the display of results.
74
4. Error Message Popups
Screenshot: Error popups for invalid queries, no results, or
network issues.
Purpose: Guides the user in correcting inputs or understanding
system limitations
75
11. Conclusion
The Book Recommendation System provides a valuable tool for book
enthusiasts to discover new books based on their interests. By
leveraging the Google Books API and presenting data through a user-
friendly Tkinter GUI, the system offers a seamless experience for users
to find and explore books. Future enhancements can further improve the
system's functionality and personalization.
Signature-
Guide: Dr. Poonam Sawant
76