A beginner-friendly FastAPI project for learning backend development. Notes are stored in a local notes.json file — no database required.
Live demo: https://ai-notes-fast-api-vlz0.onrender.com/docs
- Add a note (
POST /notes) - View all notes (
GET /notes) - View one note (
GET /notes/{id}) - Update a note (
PUT /notes/{id}) - Delete a note (
DELETE /notes/{id})
-
Create and activate a virtual environment (recommended):
python -m venv venv venv\Scripts\activate # Windows source venv/bin/activate # macOS/Linux
-
Install dependencies:
pip install -r requirements.txt
-
Run the server:
uvicorn main:app --reload
-
Open the interactive docs in your browser:
http://127.0.0.1:8000/docs
Note: the live demo runs on Render's free tier, whose disk is ephemeral — notes may be wiped on redeploy or restart.
AI-Notes-API/
├── main.py # FastAPI app and all routes
├── notes.json # Stores the notes (acts as a simple database)
├── requirements.txt # Python dependencies
└── README.md
curl -X POST http://127.0.0.1:8000/notes \
-H "Content-Type: application/json" \
-d '{"title": "First note", "content": "Learning FastAPI!"}'