You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A simple yet powerful backend API for managing library operations — built with FastAPI and SQLAlchemy.
This system allows adding and managing books, readers, and categories, as well as handling book borrowing and returns.
🚀 Features
📘 Books Management
Add, view, update, delete, and search books
Track availability (available / borrowed)
🗂 Categories
Create and manage book categories
👤 Profiles
Register and manage library staff and readers
🔄 Borrowing System
Record book borrow and return actions
Automatically mark books as unavailable when borrowed
🏗️ Tech Stack
Component
Technology
Framework
FastAPI
Database
SQLite (development), PostgreSQL (production)
ORM
SQLAlchemy
Schema Validation
Pydantic
Migrations
Alembic
Environment Config
python-dotenv
Testing
Pytest
⚙️ Installation & Setup
Clone the Repository
git clone https://github.com/CornerMan-Hyacinth/library-management-api.git
cd library-management-api
Create a Virtual Environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install Dependencies
pip install -r requirements.txt
Setup Environment Variables
Create a .env file in the project root:
Contributions are welcome!
If you'd like to improve this project:
Fork the repository
Create a feature branch (git checkout -b feature/new-feature)
Commit your changes (git commit -m "Add new feature")
Push to your branch (git push origin feature/new-feature)
Create a Pull Request
🧾 License
This project is licensed under the MIT License.
About
A Python-based database management setup using SQLAlchemy for ORM, Alembic for migrations, and python-dotenv for environment configuration. This project provides a clean, scalable structure for managing database models, connections, and schema updates — ideal for web applications and backend systems.