https://github.com/dsk52/export-health-planet
https://github.com/dsk52/export-health-planet
export health-planet json python3 requests
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/dsk52/export-health-planet
- Owner: dsk52
- Created: 2020-04-01T23:24:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T03:57:51.000Z (over 3 years ago)
- Last Synced: 2025-04-01T19:07:34.329Z (over 1 year ago)
- Topics: export, health-planet, json, python3, requests
- Language: Python
- Size: 6.84 KB
- Stars: 1
- Watchers: 0
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DUMP HEALTH PLANET
headlth planet からデータ収集するスクリプトです
- Python 3.8.2
## セットアップ
```
$ python -m venv venv
$ source venv/bin/activate
or
$ source venv/bin/activate.fish
$ pip install -r requirements.txt
```
### アカウント登録と連携アプリを作成
Health Planetでアカウントを登録後、連携アプリを作成。Client ID、Client secretを取得。
https://www.healthplanet.jp/applications.do
### アクセストークンの取得とスクリプトへの追加
下記APIの仕様書を元に下記APIを使用し、アクセストークンを取得。
1. /oauth/auth
2. /oauth/token
[Health Planet API 仕様書 | Health Planet ヘルスプラネット](https://www.healthplanet.jp/apis/api.html)
```
$ cp .env.sample .env
$ direnv edit .
// HEALTH_ACCESS_TOKEN にアクセストークンを追加
$ direnv allow
```
## 実行
```
$ python health_status.py
# output to dist dir
```