Libruary_Software

abdur rehmanabdur rehman
2 min read

Introduction

Managing books and borrowers is a core part of any library system. While many modern solutions use databases and web interfaces, I decided to start simple and build my own file based library management system using Python.

This is my first step toward real-world software development, focusing on logic, user input, and file handling.


Features

Here's what my library system can currently do:

  • Add or remove books (fiction and nonfiction)

  • Add or remove borrowers

  • Track which borrower took which book

  • Classify and view books and borrowers by category

  • Use persistent storage via .pkl files (Pickle module)


Tech Stack

  • Python

  • pickle for data storage (instead of SQL)

  • File system used for saving lists of books and borrowers


How It Works

1. Mode Selection

Users start by choosing one of the two modes:

  • Enter or remove books/borrowers

  • Classification

2. Book Management

Under the first mode, you can:

  • Add books (fiction or nonfiction)

  • Remove books (with title input)

3. Borrower Handling

The program allows:

  • Assigning a book to a borrower

  • Removing a borrower-book record

  • Viewing all current borrower entries

4. Classification

You can classify entries as:

  • Fiction / Nonfiction

  • Books / Borrowers


For Example

pythonCopyEditwith open("libruary software/fiction.pkl", "rb") as fr:
    f = pickle.load(fr)
    f.append(input("book: "))

This adds a book to the fiction category and stores it in a file.


Lessons Learned

  • Basic I/O operations

  • File handling and error management

  • How to structure if-else logic cleanly

  • Importance of error handling (e.g., file not found, invalid input)


GitHub Repository

Check out the full source code here:
๐Ÿ‘‰ GitHub: ar080907/Libruary_software


Conclusion

This was a small but exciting project that helped me solidify my Python fundamentals and understand how software can interact with files.

0
Subscribe to my newsletter

Read articles from abdur rehman directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

abdur rehman
abdur rehman