The Daily Diet API is a project developed as part of the Python Developer formation at Rocketseat. The primary objective is to provide users with a tool to manage their diet effectively. Built using Flask and MySQL, the API allows users to create accounts, log in, create meals, view meals in the database, and access personalized information about their diet progress.
- Create Account: Users can register and create their accounts securely.
- Login: Secure authentication to access personalized features.
- Create Meal: Users can add details of their meals to the database.
- View All Meals: Access a list of all meals stored in the database.
- Edit and Delete Meals: Users have the ability to modify or remove meals they created.
- User Meals List: Retrieve a personalized list of meals based on the user.
- Diet Statistics: Track the number of meals on the diet and the success percentage.
-
It should be possible to register a meal with the following information:
- Name
- Description
- Date and Time
- Compliance with the diet (Yes/No)
-
It should be possible to edit a meal, allowing changes to all the above data
- Name
- Description
- Date and Time
- Compliance with the diet (Yes/No)
-
It should be possible to delete a meal
- Delete meal functionality implemented.
-
It should be possible to list all meals for a user
- List all meals for a user functionality implemented.
-
It should be possible to view a single meal
- View single meal functionality implemented.
-
The information should be stored in a database
- Utilizes MySQL for persistent storage.
-
Clone the Repository:
bashCopy code
git clone https://github.com/your-username/daily-diet-api.git
-
Install Dependencies:
bashCopy code
pip install -r requirements.txt
-
Configure Database:
- Set up a MySQL database and update the configuration in
config.py
.
- Set up a MySQL database and update the configuration in
-
Run the Application:
bashCopy code
python app.py
-
Access API:
- Open
http://localhost:5000
in your browser or API client.
- Open