First Git Project – SCE · 2nd Year
A simple FastAPI project that manages a list of books in memory. This project was created as part of learning Git, branching, and pull requests.
- Get all books
- Get a single book by ID
- Add new books
- Delete books
- Uses in-memory data (no database)
book-list/
main.py # FastAPI app code
requirements.txt # Dependencies
README.md # Project documentation
git clone https://github.com/<your-username>/book-list.git
cd book-list
pip install -r requirements.txt
Start the FastAPI server: uvicorn main:app --reload
Open in your browser:
GET /books
GET /books/{book_id}
POST /books
Body:
{
"title": "Some Title",
"author": "Some Author"
}
DELETE /books/{book_id}
[
{ "id": 1, "title": "Nadav Magen's Book", "author": "Nadav Magen" },
{ "id": 2, "title": "C+ Book", "author": "Boring Man!" },
{ "id": 3, "title": "Java Book", "author": "Cool Man!" }
]
- Creating branches
- Committing changes
- Pull requests
- Merging (including no-fast-forward)
- Basic FastAPI usage
MIT License