Skip to content

Instantly share code, notes, and snippets.

@flatfisher
Created January 26, 2017 05:08
Show Gist options
  • Save flatfisher/8d6057e7e31a1318d04432311812b63b to your computer and use it in GitHub Desktop.
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
"CLIENT_ID" : "",
"CLIENT_SECRET" : "",
"USERNAME" : "メールアドレス",
"PASSWORD" : "パスワード"
#!/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())
$pip install lnetatmo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment