Giter Club home page Giter Club logo

fitnessdata's Introduction

FitnessData Microservice

This project is a microservice for integrating Google Fit data into your application. It allows you to retrieve and analyze fitness data such as steps, calories, and active minutes.

Features

  • Fetch step count from Google Fit
  • Retrieve calories expended and active minutes data
  • Dockerized for easy deployment

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Python 3.8 or higher
  • Docker installed on your machine
  • Google Cloud account for setting up OAuth2 credentials

Installation

  1. Clone the repository:

    git clone https://github.com/Krishpandya682/FitnessData.git
    cd FitnessData
  2. Set up the virtual environment:

    python3 -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
  3. Install dependencies:

    pip install -r requirements.txt
  4. Download the Google OAuth2 credentials:

    • Set up OAuth2 credentials in the Google Cloud Console.
    • Download the credentials.json file and place it in the root directory of this project.
  5. Run the application:

    python app.py

Running with Docker

  1. Build the Docker image:

    docker build -t fitness-data-service .
  2. Run the Docker container:

    docker run -p 5002:5002 fitness-data-service

Usage

Once the service is running, you can interact with it via API endpoints. For example, to fetch step count data, send a GET request to:

GET http://localhost:5002/steps

You can use tools like Postman or curl to test the endpoints.

Project Structure

.
├── app.py                # Main application file
├── dockerfile            # Docker configuration
├── requirements.txt      # Python dependencies
├── .gitignore            # Files to ignore in Git
└── venv/                 # Virtual environment (not included in Git)

fitnessdata's People

Contributors

krishpandya682 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.