You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-20Lines changed: 14 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,33 +1,30 @@
1
1
# FITBIT WEB SERVICE USING PYTHON
2
2
3
-
FITBIT Api's are authenticated by oAuth2.0. In here, there is a Python Web Service coded as a wrapper around Fitbit's conventional API's using Python's Falcon Web Services Framework.
3
+
Python wrapper; a RESTful wrapper over FITBIT.
4
4
5
-
NOTE: THIS CODEBASE USES FALCON & GUNICORN TO FACILITATE WEB SERVICE. GUNICORN WORKS ONLY ON UNIX/LINUX MACHINES. HENCE, THIS WILL BE OPERATIONAL ONLY ON LINUX DISTRO'S /UNIX MACHINES. WINDOWS IMPLEMENTATION IS WIP.
5
+
NOTE: uses gunicorn (https://docs.gunicorn.org/en/stable/index.html) which is WSGI HTTP server for `*nix` systems. On windows, you might want to swap gunicorn with uWSGI or other alternatives.
6
6
7
7
# Features:
8
-
- oAuth Authorization callable via dedicated endpoint.
9
-
- Fitbit config will be easy and manageable.
10
-
- Multithreaded usage using gunicorn server to build seamless apps using Fitbit data.
11
-
12
-
# Setup:
13
-
- Create a valid fitbit account and setup an App here - https://dev.fitbit.com/apps/new
14
-
- Make notes of client ID and client secret.
15
-
- clone this repo; ensure to cd into the directory 'fitbit_webservice'.
16
-
- cd fitbit_webservice/config -> edit file named 'fitbit_wrapper_config.py', add client ID and client secret where its asked to; save.
17
-
- pip install all the requirements (Python=3). (NOTE: Always better to create a dedicated virtual environment. Either using Anaconda /Conventional Python)
18
-
- To start the web service, type the following command (whilst staying on 'fitbit_webservice' directory):
8
+
- oAuth via dedicated endpoint.
9
+
- config is simpler.
10
+
- leverages concurrency & threading - so its decently fast.
11
+
12
+
# Getting Started:
13
+
- Create a valid fitbit account and setup an `App` here - https://dev.fitbit.com/apps/new
14
+
- Grab your `client ID` and `client secret`.
15
+
- Clone & `cd fitbit_webservice`
16
+
- Edit `fitbit_wrapper_config.py` > add client ID and client secret > save.
17
+
-`pip install -r requirements.txt` in venv of your choice.
- When the above request is served for the first time, oAuth will carry on with its magic to create valid token's for usage. Response from these requests will be self-explanatory.
28
25
29
26
# Keywords
30
-
- todays_steps_realtime: Get Real time steps (Until last sync with Fitbit) from fitbit.
27
+
- todays_steps_realtime: Get Real time steps (Until last sync with the device) from fitbit.
31
28
- last_7_days_steps: Get total steps covered for last 7 days.
32
29
- todays_calories_realtime: Get calories burned for for current day.
33
30
- last_7_days_calories: Get calories burned data for last 7 days.
@@ -46,9 +43,6 @@ NOTE: THIS CODEBASE USES FALCON & GUNICORN TO FACILITATE WEB SERVICE. GUNICORN
46
43
- todays_sleep_details: Get sleep details for current day.
47
44
- todays_heart_details: Get heart details for current day.
48
45
49
-
# Support
50
-
For any issues write to Pruthvi @ pruthvikumar.123@gmail.com. Ensure to have a valid subject line, detailed message with appropriate stack trace to expect prompt/quick response.
0 commit comments