Alt School Africa Second Semester Exam Project
# E-Library API
The E-Library API is a backend system for managing an online library. It provides a way to create, retrieve, update, and delete users, books, and borrowing records, while maintaining an in-memory database for all operations.
## Features
- **User Management**:
- Create, retrieve, update, and delete user profiles.
- Track user activity status.
- **Book Management**:
- Add, update, and delete book records.
- Manage availability of books for borrowing.
- **Borrowing Records**:
- Record borrowing and returning of books.
- View borrowing history for specific users and specific books.
## Prerequisites
- Python 3.9 or higher.
- FastAPI framework.
- Uvicorn ASGI server.
## Installation
### Clone the Repository
```bash
git clone
github.com
cd E-Library-API-System
```
### Install Dependencies
```bash
pip install -r requirements.txt
```
## Running the Application
### Start the Server
Run the server using Uvicorn:
```bash
uvicorn main:app --reload
```
The server will be accessible at `
127.0.0.1`.
### API Documentation
- Swagger UI:
127.0.0.1
- ReDoc:
127.0.0.1
## Directory Structure
```plaintext
E-LIBRARY API SYSTEM/
├── app/ # Main application directory
│ ├── crud/ # CRUD logic for users, books, and records
│ │ ├── __init__.py
│ │ ├── book_crud.py
│ │ ├── record_crud.py
│ │ └── user_crud.py
│ ├── routes/ # API route definitions for books, users, and records
│ │ ├── __init__.py
│ │ ├── book_routes.py
│ │ ├── record_routes.py
│ │ └── user_routes.py
│ ├── schemas/ # Pydantic models for data validation
│ │ ├── __init__.py
│ │ ├── book_schema.py
│ │ ├── record_schema.py
│ │ └── user_schema.py
│ ├── services/ # Core services and business logi …