Created
January 26, 2017 05:08
-
-
Save flatfisher/8d6057e7e31a1318d04432311812b63b to your computer and use it in GitHub Desktop.
Netatmo Weather StationのAPIをPythonで触ってみる。#Python #Netatmo ref: http://qiita.com/flatfisher/items/71a84b9f169bd5a33a1c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"CLIENT_ID" : "", | |
"CLIENT_SECRET" : "", | |
"USERNAME" : "メールアドレス", | |
"PASSWORD" : "パスワード" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# encoding=utf-8 | |
import lnetatmo | |
#tokenを取得 | |
authorization = lnetatmo.ClientAuth( | |
clientId = "", | |
clientSecret = "", | |
username = "", | |
password = "", | |
scope = "" | |
) | |
#天気情報の取得 | |
weather_station = lnetatmo.WeatherStationData(authorization) | |
#天気情報の表示 | |
print(weather_station.lastData()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$pip install lnetatmo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment