- Clone the repository
git clone https://github.com/HaidarH726/FastAPI-project.git- Go into the project folder
cd FastAPI-project- Install dependencies
pip install -r requirements.txt- Start the FastAPI server
uvicorn main:app --reload- Open the API documentation in your browser
http://127.0.0.1:8000/docs
You should now see the interactive Swagger UI where you can test all endpoints.
This project is a simple REST API built with FastAPI that allows users to manage tasks. It demonstrates how APIs receive requests, process data, store information, and return responses.
- Create tasks
- View all tasks
- View a single task
- Update a task
- Delete a task
- Delete all tasks
- Task statistics endpoint
- File-based storage using JSON lines
- Python
- FastAPI
- Pydantic
- Uvicorn
Tasks are stored in a file called:
tasks.txt
Each line in the file represents one task in JSON format. This simulates database storage for learning purposes and shows how backend systems persist data.