用于beddit睡眠跟踪器的api客户端
beddit-python的Python项目详细描述
编辑python图片::https://travis-ci.org/giginet/beddit-python.svg?branch=master
:目标:https://travis ci.org/giginet/beddit python
…图片::https://workalls.io/repos/github/giginet/beddit-python/badge.svg?branch=master
:目标:https://coveralls.io/github/giginet/beddit-python?branch=master
python中的beddit的api客户端。_编辑:http://www.beddit.com
_ API文档:https://github.com/beddit/beddit-api
代码::sh
pip安装beddit python
用法
----
>列出每天的睡眠分数
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
……代码::python
from datetime import datetime
from beddit.client import bedditclient
client=bedditclient('user@example.com',password)
start\u date=datetime(2016,7,1)
end\u date=datetime(2016,7,31)
sleeps=client.get\u sleeps(start=start\u date,end=end\u date)
打印(sleep.date.strftime('%y-%m-%d'),sleep.property.total_sleep_score)
…代码::txt
2016-07-01 75
2016-07-02 92
….
:目标:https://travis ci.org/giginet/beddit python
…图片::https://workalls.io/repos/github/giginet/beddit-python/badge.svg?branch=master
:目标:https://coveralls.io/github/giginet/beddit-python?branch=master
python中的beddit的api客户端。_编辑:http://www.beddit.com
_ API文档:https://github.com/beddit/beddit-api
代码::sh
pip安装beddit python
用法
----
>列出每天的睡眠分数
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
……代码::python
from datetime import datetime
from beddit.client import bedditclient
client=bedditclient('user@example.com',password)
start\u date=datetime(2016,7,1)
end\u date=datetime(2016,7,31)
sleeps=client.get\u sleeps(start=start\u date,end=end\u date)
打印(sleep.date.strftime('%y-%m-%d'),sleep.property.total_sleep_score)
…代码::txt
2016-07-01 75
2016-07-02 92
….