https://github.com/adnaaaen/library-api
A FastAPI project demonstrating CRUD operations and API concepts. This project includes endpoints for managing library resources, showcasing practical implementation of create, read, update, and delete functionalities using FastAPI.
https://github.com/adnaaaen/library-api
Last synced: 5 months ago
JSON representation
A FastAPI project demonstrating CRUD operations and API concepts. This project includes endpoints for managing library resources, showcasing practical implementation of create, read, update, and delete functionalities using FastAPI.
- Host: GitHub
- URL: https://github.com/adnaaaen/library-api
- Owner: adnaaaen
- Created: 2024-07-14T19:17:51.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-11-28T04:35:00.000Z (6 months ago)
- Last Synced: 2024-11-28T05:24:55.335Z (6 months ago)
- Language: Python
- Homepage:
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 📚 Library Management API in FastAPIThis project is a CRUD application for managing a library's book collection, built using FastAPI and SQLite.
[](https://fastapi.tiangolo.com/)
[](https://docs.sqlalchemy.org/)
[](https://www.uvicorn.org/)
[](https://docs.pydantic.dev/)
[](https://pip.pypa.io/)## 🚧 EndPoints
## 🚀 Installation
1. **Clone the repository**:
```sh
git clone https://github.com/adnaaaen/library-api.git
cd library-api
```2. **Create and activate a virtual environment**:
```sh
python -m venv .venv
source .venv/bin/activate # On Windows, use `.venv\Scripts\activate`
```3. **Install the dependencies**:
```sh
pip install -r requirements.txt
```## 🛠️ Environment Variables
Create a `.env` file in the root directory of your project and add the following environment variables:
```sh
DATABASE_URL="sqlite:///database.db"
```## ⚙️ Running the Application
1. **Start the FastAPI server**:
```bash
uvicorn src.main:app --reload --port 8000 --host localhost
```2. **Access the API documentation**:
Open your browser and navigate to `http://localhost:8000/` to access the interactive API documentation (Swagger UI).