module book

Book Module

This module provides functionalities to manage a library system, including book management, tracking the issue and return of books, and updating book statuses. Modules:

bookutils: Utility functions for handling book data operations such as appending to CSV, finding books, and updating book status.

Classes:

Book: Represents a book in the library and provides methods to add, find, issue, and return books.

Functions:

add_book(): Adds a new book to the library.

find_book(name): Finds a book by its title.

get_all_books(): Retrieves a list of all books in the library.

issue_book(name): Issues a book and updates its status to “Yes”.

return_book(name): Returns a book and updates its status to “No”.

Global Variables

  • bookutils

class Book

method Book.__init__

__init__(name, author, volume, issued)

Creates the object of the Book class.

Parameters:

  • name (str): The title of the book.
  • author (str): The author of the book.
  • volume (str): The volume number of the book.
  • issued (str): Issued status of the book.

Returns:

  • Book: An object of the Book class.

method Book.add_book

add_book()

Adds the book into the library

This method takes the book’s attributes and appends them to a CSV file, effectively adding the book to the library’s records.

Parameters: None

Returns: None


method Book.find_book

find_book(name)

Finds the book by name from the library

Parameters:

  • name (str): The title of the book to be found

Returns:

  • result(pandas.DataFrame) : A pandas dataframe containing the details of the book

method Book.get_all_books

get_all_books()

Gets the list of all books from the library

Parameters: none

Returns:

  • result(pandas.DataFrame) : A pandas DataFrame containing the details of all books

method Book.issue_book

issue_book(book_name)

Issues the book and updates the “issued” column to “Yes”

Parameters: None

Returns: None


method Book.return_book

return_book(name)

Returns the book and updates the “issued” column to “No”

Parameters: None

Returns: None


This file was automatically generated via lazydocs.