π½οΈ Restaurant Menu API (FastAPI)
A REST API built with Python and FastAPI that retrieves and exposes restaurant and menu data through HTTP endpoints.
This project was created to practice backend development, API design, and working with external data sources using modern Python tools.
FastAPI is a modern Python framework designed for building fast and efficient APIs with automatic documentation and type-based validation.
π About the Project
This API provides endpoints to retrieve restaurant information and their menus from a dataset.
It demonstrates core backend concepts such as:
REST API development
Data fetching from external sources
Query parameters
Endpoint design
JSON responses
The project serves as a practical study of API development with FastAPI.
βοΈ Technologies Used
Python
FastAPI
Requests
Uvicorn (ASGI server)
JSON
π Features
Retrieve a list of restaurants
Filter restaurants by name
Access menu data for specific restaurants
JSON API responses
Automatic API documentation with Swagger UI
π οΈ Running the Project Locally 1οΈβ£ Clone the repository git clone https://github.com/raiego/fastapi-cardapio-restaurantes-python.git 2οΈβ£ Navigate to the project folder cd fastapi-cardapio-restaurantes-python 3οΈβ£ Create a virtual environment python -m venv venv
Activate it:
Windows
venv\Scripts\activate
Linux / Mac
source venv/bin/activate 4οΈβ£ Install dependencies pip install -r requirements.txt 5οΈβ£ Run the API uvicorn main:app --reload
The API will be available at:
http://127.0.0.1:8000 π API Documentation
FastAPI automatically generates interactive documentation.
You can access it at:
or
http://127.0.0.1:8000/redoc π Project Structure fastapi-cardapio-restaurantes-python β βββ main.py βββ requirements.txt βββ README.md π― What I Learned
Building REST APIs with FastAPI
Handling HTTP requests and responses
Working with JSON data
Designing clean API endpoints
Using Python for backend web development
π License
This project is for educational purposes.