FPTCheckInFastAPI / README.md
Hoanha2101's picture
fix readme.md
a18e662
|
Raw History Blame Contribute Delete
2.15 kB
metadata
title: FPTCheckInFastAPI
emoji: 📋
colorFrom: indigo
colorTo: pink
sdk: docker
app_file: Dockerfile
pinned: false

🚀 FPT CheckIn Server

This project uses FastAPI to build a fast, easy-to-use, and scalable RESTful API.


🧠 System Requirements

  • Python 3.7 or later
  • pip to manage libraries

📦 Installation

  1. Clone the project:
git clone https://github.com/Hoanha2101/Server_CheckInAppMobile.git
cd Server_CheckInAppMobile
  1. Create virtual environment (optional but recommended):
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
  1. Install required libraries:
pip install -r requirements.txt

If you don't have the requirements.txt file, you can install it directly:

pip install fastapi uvicorn
  1. 🚀 Run the application Run the following command to start the FastAPI server in development mode (with automatic reload when code changes):
uvicorn main:app --reload
#hoặc
uvicorn main:app --host 0.0.0.0 --port 8000

Explanation:

  • main: is the name of the Python file, for example main.py

  • app: is the FastAPI() object in that file

  • --reload: automatically reload when code changes (for devs)

  1. 🌐 Access API documentation

After running successfully, access the browser:

Swagger UI (visual API testing interface):

http://127.0.0.1:8000/docs

Redoc (alternative documentation interface):

http://127.0.0.1:8000/redoc

📁 Configuration project architecture

📁
│   config.py
│   connectDatabase.py
│   faceDetect.py
│   FaceNet.py
│   main.py
│   README.md
│   requirements.txt
│
├───images
│       check_image.jpg
│       faceArea.jpg
│
├───sql
│       CreateData.sql
│
├───weights
│       data.pickle
│       yolov8n-face.pt
│
└───__pycache__
        config.cpython-39.pyc
        connectDatabase.cpython-39.pyc
        faceDetect.cpython-39.pyc
        FaceNet.cpython-39.pyc
        main.cpython-39.pyc