Skip to content

Commit bed13fa

Browse files
author
Pruthvi Kumar
authored
Update README.md
1 parent 6457d90 commit bed13fa

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

README.md

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
# FITBIT WEB SERVICE USING PYTHON
22

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.
44

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.
66

77
# 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.
1918
```sh
2019
gunicorn -b localhost:8000 fitbit_web_service:app --reload
2120
```
22-
- The above command must start gunicorn server locally and listen on port 8000 (Please feel free to change this to your convinience).
23-
- Go to webserver and check with this endpoint:
21+
- Interact with your webservice with dedicated #Keywords:
2422
```sh
2523
http://localhost:8000/processFitbitApi?keyword=todays_steps_real_time
2624
```
27-
- 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.
2825

2926
# 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.
3128
- last_7_days_steps: Get total steps covered for last 7 days.
3229
- todays_calories_realtime: Get calories burned for for current day.
3330
- 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
4643
- todays_sleep_details: Get sleep details for current day.
4744
- todays_heart_details: Get heart details for current day.
4845

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.
51-
5246
# License
5347
----
5448
MIT License

0 commit comments

Comments
 (0)