A simple CRUD (Create, Read, Update, Delete) API for managing notes built with FastAPI.
- Create new notes
- Read/retrieve notes
- Update existing notes
- Delete notes
- Python 3.7+
- FastAPI
- Uvicorn
- Pydantic
pip install fastapi uvicornuvicorn main:app --reloadThe API will be available at http://localhost:8000
| Method | Endpoint | Description |
|---|---|---|
| POST | /notes |
Create a new note |
| GET | /notes |
Get all notes |
| GET | /notes/{id} |
Get a specific note |
| PUT | /notes/{id} |
Update a note |
| DELETE | /notes/{id} |
Delete a note |
- Open Postman and create a new request
- Set the request type (GET, POST, PUT, or DELETE)
- Enter the URL:
http://localhost:8000/notes(or with/{id}for specific operations) - For POST/PUT requests, go to the Body tab, select raw, choose JSON, and add your note data
- Click Send to execute the request
- Interactive API docs:
http://localhost:8000/docs - Alternative docs:
http://localhost:8000/redoc