具有简单rest api的轻量级习惯跟踪程序。
habits的Python项目详细描述
具有简单rest api的轻量级习惯跟踪程序。
功能
- 支持sqlite、mysql和postgres数据库
- 简单的Web界面
- REST-ful API
安装和使用
pip install habits # install via pip habits # start the web server, browse to localhost:5000
API
Base URL: http://<your-habits-instance-hostname>/api/ Endpoints: GET /habits - Get all habits GET /habits/names - Get a mapping of habit slugs to names GET /habits/<habit_slug> - Get the slug and name for a habit POST /habits/<habit_slug> - Make a new habit GET /entries/export - Get all entries GET /entries/<YYYY-MM-DD date string> - Get entry for a day POST /entries/<YYYY-MM-DD date string> - Set entry for a day POST /entries/<YYYY-MM-DD>/<habit_slug> - Set the value for a habit on a day
从源安装
git clone https://github.com/csu/habits.git cd habits # make a Python virtual environment, if you want pip install -r requirements.txt bower install python habits/server.py