https://github.com/rafaybbx/library-management-system
Command Line Library Management System in Python and MySQL
https://github.com/rafaybbx/library-management-system
mysql-database python
Last synced: about 2 months ago
JSON representation
Command Line Library Management System in Python and MySQL
- Host: GitHub
- URL: https://github.com/rafaybbx/library-management-system
- Owner: rafaybbx
- License: mit
- Created: 2022-01-16T15:32:10.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-04T02:34:16.000Z (over 1 year ago)
- Last Synced: 2025-05-27T02:42:41.379Z (about 1 year ago)
- Topics: mysql-database, python
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Library Management System
This project is a Library Management System that allows users to manage books, users, and lending records. The project uses a **MySQL database** managed with **phpMyAdmin** and **XAMPP**, and the main code is written in **Python**.
## Prerequisites
- **XAMPP** (for Apache and MySQL)
- **Python 3.x**
- **MySQL Connector for Python**
## Setup Instructions
### Step 1: Install XAMPP
1. Download and install XAMPP from [Apache Friends](https://www.apachefriends.org/).
2. Start the **Apache** and **MySQL** services from the XAMPP Control Panel.
### Step 2: Setup the Database
1. Open **phpMyAdmin** by navigating to [http://localhost/phpmyadmin](http://localhost/phpmyadmin) in your web browser.
2. Create a new database named `library`.
3. Import the SQL dump file (`library.sql`) into the `library` database:
- Click on the `library` database.
- Go to the **Import** tab.
- Choose the `library.sql` file and click **Go**.
### Step 3: Install MySQL Connector for Python
Install the MySQL Connector for Python using pip:
```bash
pip install mysql-connector-python
```
### Step 4: Configure the Python Script
1. Open the `lbm.py` file.
2. Ensure the database connection details are correct:
```python
host = "localhost"
user = "root"
password = ""
```
### Step 5: Run the Python Script
Run the `lbm.py` script:
```
python lbm.py
```
## Usage
### Admin Menu
1. Register New Student
2. Delete Existing Student
3. Register New Manager
4. Delete Existing Manager
### Logout
1. Manager Menu
2. Add New Book
3. Remove Existing Book
4. Logout
### Student Menu
1. Search Books
2. Lend Book
3. Return Book
4. Logout
## License
This project is licensed under the MIT License.
## Acknowledgements
- [phpMyAdmin](https://www.phpmyadmin.net/)
- [XAMPP](https://www.apachefriends.org/index.html)
- [MySQL Connector for Python](https://dev.mysql.com/doc/connector-python/en/)