https://github.com/asifrahaman13/library-management
A simple library management system using the Fast API, SQLModel. Utilized simple sqlite database.
https://github.com/asifrahaman13/library-management
python sql sqlite3
Last synced: about 1 year ago
JSON representation
A simple library management system using the Fast API, SQLModel. Utilized simple sqlite database.
- Host: GitHub
- URL: https://github.com/asifrahaman13/library-management
- Owner: asifrahaman13
- Created: 2024-03-27T06:10:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-28T01:50:23.000Z (about 2 years ago)
- Last Synced: 2025-02-05T01:51:39.450Z (over 1 year ago)
- Topics: python, sql, sqlite3
- Language: Python
- Homepage:
- Size: 95.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Library management system
## How to run the code
First clone the repository.
```bash
git clone https://github.com/asifrahaman13/library-management.git
```
## Backend
Open the backend in a terminal.
```bash
cd backend/
```
Create virtual environment and install the dependencies.
```bash
virtualenv .venv
```
Activate the virtual environment
```bash
source .venv/bin/activate
```
Install dependencies.
```bash
pip install -r requirements.txt
```
Now change the .env.example to .env file enter the required data in the .env file.
```bash
mv .env.example .env
```
Run the backend in port 8000
```bash
uvicorn src.main:app --reload
```
# Want to run in docker?
In case you are facing any issue and want to run the application using docker.
First build the image
```bash
docker -t build backend:latest .
```
Next you can simply run the application.
```bash
docker run -d -p 8000:8000 backend:latest
```
# Link to the documentation for the APIs:
https://docs.google.com/document/d/12-ozqYCtt2LpQUaTKo49m8-zx0tKBzRB5VM0c-0-TqY/edit?usp=sharing
# Testing
Simple Pytest scripts are written for sample unit and integration testing. Follows the official fast api documentation:
https://fastapi.tiangolo.com/tutorial/testing/
To test the application use the following script:
```bash
python3 -m pytest
```