Skip to content

Commit d359f6e

Browse files
authored
complete library management system
implement library management system core functionality - Add Book module with search, add, update, delete operations - Implement User management with membership tracking - Create Transaction system for book borrowing/returning - Add fine calculation for overdue books - Implement SQLite database with proper schema - Add utility functions for validation and ID generation - Create comprehensive CLI interface with menus - Add reporting and statistics features - Include input validation and error handling
1 parent bc26067 commit d359f6e

18 files changed

+1240
-0
lines changed

LibaryManagement/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Library Management System
2+
3+
A comprehensive library management system built with Python.
4+
5+
## Features
6+
7+
- **Book Management**: Add, search, update, and remove books
8+
- **User Management**: User registration and membership management
9+
- **Transaction System**: Book borrowing and returning with fine calculation
10+
- **Reports**: Comprehensive statistics and reporting
11+
- **Database**: SQLite database with proper data management
12+
13+
## Installation
14+
15+
1. Clone the repository:
16+
17+
```bash
18+
git clone <repository-url>
19+
cd library_management
20+
```

LibaryManagement/__init__.py

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
"""
2+
Library Management System
3+
A comprehensive library management system with book tracking, user management,
4+
and transaction processing.
5+
6+
Author: Your Name
7+
Version: 1.0.0
8+
"""
9+
10+
__version__ = "1.0.0"
11+
__author__ = "Your Name"
12+
__email__ = "your.email@example.com"
13+
14+
from modules.book import Book, BookManager
15+
from modules.user import User, UserManager
16+
from modules.transaction import Transaction, TransactionManager
17+
from modules.database import DatabaseManager
18+
from modules.utils import Utilities, ValidationError
19+
20+
__all__ = [
21+
# Classes
22+
'Book',
23+
'BookManager',
24+
'User',
25+
'UserManager',
26+
'Transaction',
27+
'TransactionManager',
28+
'DatabaseManager',
29+
'Utilities',
30+
'ValidationError',
31+
32+
# Modules
33+
'book',
34+
'user',
35+
'transaction',
36+
'database',
37+
'utils'
38+
]
39+
40+
# Package initialization
41+
def initialize_database(db_path='data/library.db'):
42+
"""Initialize the database with required tables"""
43+
from modules.database import DatabaseManager
44+
db = DatabaseManager(db_path)
45+
print("Database initialized successfully!")
46+
return db
47+
48+
def get_version():
49+
"""Return the current version of the package"""
50+
return __version__
51+
52+
# Create package-level instances for easy access
53+
book_manager = BookManager()
54+
user_manager = UserManager()
55+
transaction_manager = TransactionManager()
56+
57+
print(f"Library Management System {__version__} initialized successfully!")

LibaryManagement/data/library.db

Whitespace-only changes.

0 commit comments

Comments
 (0)