The workout tracking project utilizes Sheety API and Google Sheets to track and record users' workout activities. Users can input their exercise details, such as exercise name, duration, and the data is stored in a Google Sheets spreadsheet via Sheety API.
- User-friendly command-line interface for entering workout details.
- Automatic recording of workout data in a Google Sheets spreadsheet.
- Real-time tracking of exercise name, duration, and calories burned.
- User Input: Users input their exercise details, including exercise name, duration through a command-line interface.
- Nutritionix API: The entered exercise details are sent to the Nutritionix API to retrieve nutritional information.
- Sheety API: The retrieved exercise data is then sent to the Sheety API, which stores it in a Google Sheets spreadsheet.
- Google Sheets: The workout data is updated in real-time in the Google Sheets spreadsheet, allowing users to track their exercise activities.
- Clone the Repository:
- Navigate to the Project Directory:
- Install Required Libraries:
- Set Up API Keys and Endpoints:
- Update Python Script:
- Run the Script:
git clone https://github.com/Manjunathhs-0003/Workout-Tracking.git
cd workout-tracking-project
pip install requests
Obtain API keys and endpoints for Sheety API and Google Sheets API as mentioned in the documentation.
Replace the placeholder API keys and endpoints in your Python script with the actual ones obtained from the documentation.
python main.py
- Sheety API: Used to interact with Google Sheets and store workout data.
- Google Sheets API: Used to access and update Google Sheets spreadsheet data.
- Nutritionix API: Used to retrieve nutritional information for exercises entered by users.
Sheety API:
Sign up or log in to Sheety (https://sheety.co/).
Create a new project or select an existing one.
In your project settings, you will find your Sheety API key.
You can also find the endpoint for your project, which you'll use to make requests to Sheety.
Google Sheets API:
Go to the Google Developers Console (https://console.developers.google.com/).
Create a new project or select an existing one.
Enable the Google Sheets API for your project.
Create credentials for your project and download the JSON file containing your client secret.
You will use this file to authenticate requests to the Google Sheets API.
You'll need the requests library to make HTTP requests in Python. You can install it using pip:
pip install requests
You've already started with your Python script. Ensure you have the necessary imports, variables for user data (like gender, weight, height, age), and endpoints for the Sheety API and Nutritionix API.
Use the requests library to make POST requests to the Sheety API endpoint with workout data. You'll need to include the Sheety API key in the request headers.
After receiving a successful response from Sheety, you can update your Google Sheets with the workout data. Use the Google Sheets API for this purpose. You'll need to authenticate your requests using the client secret JSON file.
Here are the documentation links you can refer to for obtaining API keys and endpoints:
- Sheety API Documentation: Sheety Documentation
- Google Sheets API Documentation: Google Sheets API Documentation