This app allows a librarian to perfom CRUD operations on books and library members. It utilizes the Frappe API to import books to the library
- Create a virtual environment
python -m venv venv
- Activate the Virtual Environment
source venv/bin/activate
- Install Dependencies
pip install -r requirements.txt
- Set Environment Variables. Create a .env file in the project root directory
SECRET_KEY=YourSecretKey
DEBUG=True
DATABASE_URI=sqlite:///library.db
- Initialize the Database . Create the initial database and apply migrations.
flask db init
flask db migrate
flask db upgrade
-
routes/: This directory contains Python files that define different routes and views for your application.-
book.py: Manages routes and views for book-related operations. Imports book using the Frappe API, adds book to the library database, allows Librarian to search for books, updates book details, deletes book details, and view all books -
member.py: Handles routes and views for library member-related operations. Allows the librarian to search for members, update member details, view members, delete members and view all members -
transaction.py: Contains routes and views for handling book transactions (borrowing and returning). Allows the librarian to issues ooks, return books, and view transactions -
auth.py: Handles user-related routes and views (authentication, registration, homepage.).
-
-`templates/': Stores HTML templates for rendering different pages.
-
book/Contains: -
update_books.html for updating book details 
-
member/Contains: -
search_members.html for searching for members in the library
-
transaction/Contains: -
auth/Contains: -
static/Contains:- styles.css
Defines the database models for the application, including models for books, members, and transactions.