This is an example flask web framework app that are using Python 3 API wrapper for Garmin Connect to get your activity data.
- https://connect.garmin.com/
- https://pypi.org/project/garminconnect/
- https://github.com/cyberjunky/python-garminconnect
-
Install python if you don't have it.
-
Clone this repository. https://github.com/nohaelgendy/flask-garminconnect.git
-
Navigate into the project directory:
$ cd flask-garminconnect
-
Create a new virtual enviroment:
Note: When running the commands, you may need to type python3/pip3 instead of python/pip depending on your setup.
$ python -m venv venv $ . venv/bin/activate
-
Install the dependencies (python pacakages) listed in "requirements.txt" file:
$ pip install -r requirements.txt
-
Create the enviroment variables file ".env":
$ touch .env
-
Add this variables and your garmin connect "EMAIL", "PASSWORD" to the .env file:
FLASK_APP=app FLASK_ENV=development EMAIL = "[email protected]" PASSWORD = "example123"
-
Run the app:
$ flask run