{"id":20885385,"url":"https://github.com/lab11/fitbit_leaderboard","last_synced_at":"2025-05-12T19:30:50.822Z","repository":{"id":6899516,"uuid":"8149378","full_name":"lab11/fitbit_leaderboard","owner":"lab11","description":"Compete to be the Fibit step champion!","archived":false,"fork":false,"pushed_at":"2014-06-03T20:34:07.000Z","size":769,"stargazers_count":5,"open_issues_count":7,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-01T10:12:10.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lab11.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-11T23:36:11.000Z","updated_at":"2022-04-11T19:17:38.000Z","dependencies_parsed_at":"2022-07-10T17:30:43.632Z","dependency_job_id":null,"html_url":"https://github.com/lab11/fitbit_leaderboard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lab11%2Ffitbit_leaderboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lab11%2Ffitbit_leaderboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lab11%2Ffitbit_leaderboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lab11%2Ffitbit_leaderboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lab11","download_url":"https://codeload.github.com/lab11/fitbit_leaderboard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253808135,"owners_count":21967494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T08:13:21.994Z","updated_at":"2025-05-12T19:30:50.457Z","avatar_url":"https://github.com/lab11.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Fitbit Leaderboard\n==================\n\nWeb application to display a graph of users' weekly steps based on fitbit.com.\n\nDependencies\n------------\n\nThe Fitbit Leaderboard runs on Python 3 and requires a few extra packages\nto be installed.\n\n    sudo pip3 install flask fitbit\n\n\n\nRunning a Test Instance\n-----------------------\n\nThe first thing you must configure are the options to the fitbit leaderboard.\nCopy `reference_config.py` to `fl_config.py` and update the entries.\n\nOnce you have done that, there are a couple ways to test the fitbit leaderboard:\n\n### Test, Fake Data\n\nThe fitbit leaderboard can be run with fake data to test the operation. To\ncreate a test database with fake data run:\n\n    ./create_test_db.py\n\nThen the actual leaderboard webserver can be run with:\n\n    ./fitbit_leaderboard.py --no-update\n\nBrowse to http://127.0.0.1:5000 to view the site.\n\n### Test, Real Data\n\nTo use the fitbit leaderboard properly you need to register with fitbit.com\nto get API keys. Then `fl_config.py` with the correct API values.\n\nThen simply:\n\n    ./fitbit_leaderboard.py\n\n### Real Webserver, Real Data\n\nRegister with fitbit.com and update `fl_config.py`. Then use nginx and uwsgi.\n\n\nRun With nginx and uWsgi\n------------------------\n\nnginx needs to be recompiled with the `more_set_input_headers` extension\nto use the following config script. This lets the python code know what\nprefix to use (for example '/fitbit') in the URLs in the HTML. The actual\n/fitbit is not included in the python paths so that the code is agnostic\nand could be used with any prefix (like '/fb') without changing any code.\n\n### Example nginx conf file:\n\n\tserver {\n\t\tlisten   80; ## listen for ipv4; this line is default and implied\n\n\t\tserver_name \u003cyour hostname, ex: fitbit.yourserver.com\u003e;\n\n\t\tlocation /static {\n\t\t\talias\t/\u003cpath to static\u003e/static;\n\t\t}\n\n\t\tlocation /fitbit {\n\t\t\tmore_set_input_headers 'X-Script-Name: /fitbit';\n\n\t\t\t# Checks if the 'Host' header is set, and if not applies it.\n\t\t\tif ($http_host = '') {\n\t\t\t\tmore_set_input_headers 'Host: \u003cyour hostname\u003e';\n\t\t\t}\n\n\t\t\tinclude         uwsgi_params;\n\t\t\tuwsgi_pass      unix:/tmp/fitbit_leaderboard.sock;\n\n\t\t\t# This strips the /fitbit prefix from the url\n\t\t\tuwsgi_param\tSCRIPT_NAME /fitbit;\n\t\t\tuwsgi_modifier1 30;\n\t\t}\n\t}\n\nThis conf file allows you to put the application with a prefix (this example\nuses `/fitbit`) without changing any of the python or html code in the\nleaderboard app itself. Using the `more_set_input_headers` directive does\nrequire http://wiki.nginx.org/HttpHeadersMoreModule to be compiled in with\nnginx, however.\n\n### uWsgi conf:\n\n\t[uwsgi]\n\tplugins=python\n\tvhost=true\n\tgid=www-data\n\tuid=www-data\n\tmaster=true\n\tprocesses=5\n\tchdir=/\u003cpath to app\u003e/fitbit_leaderboard\n\thome=/\u003cpath to app\u003e/fitbit_leaderboard/venv\n\tsocket=/tmp/fitbit_leaderboard.sock\n\tcallable=app\n\tmodule=fitbit_leaderboard\n\tchmod-socket=666\n\tenable-threads=true\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flab11%2Ffitbit_leaderboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flab11%2Ffitbit_leaderboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flab11%2Ffitbit_leaderboard/lists"}