This is a simple To-Do list API built using FastAPI framework with MongoDB Atlas as the database. It provides endpoints to perform CRUD operations on To-Do items.
- Clone the repository:
git clone https://github.com/badalk121/Todo_API.git
- Install the dependencies:
pip install -r requirements.txt
Before running the API, make sure to set up the MongoDB Atlas connection URL, username, and password in the config.py
file.
- Start the server:
uvicorn main:app --reload
-
Once the server is running, you can access the API documentation at
http://127.0.0.1:8000/docs
. -
Use the API endpoints to manage your To-Do list:
POST /todos/
: Create a new todo.GET /todos/{todo_id}
: Retrieve a todo by ID.- Implement other CRUD functionalities similarly.