Skip to main content

habits

A lightweight habit tracker with a simple REST API.

Features

  • Support for SQLite, MySQL, and Postgres databases

  • Simple web interface

  • REST-ful API

Installation and Usage

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

Install from Source

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

Metadata

Release files for habits 0.0.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for habits 0.0.20
File Size Uploaded
habits-0.0.20.tar.gz 233.6 kB Details

Release files / habits-0.0.20.tar.gz

Download URL habits-0.0.20.tar.gz
Size 233.6 kB
Tags Source
SHA-256 checksum
How to use checksums
057a4a9df8b55b095b9db69b8edba9dd08154cb18e6598677aa47c0dd14bc095
BLAKE2b-256 checksum
How to use checksums
5ddff204e6c17c3941b158970fec79e907e3f6def4a6d94f1f859df7f164fefc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.20 This release

1 release file

0.0.19

1 release file

0.0.18

1 release file

0.0.17

1 release file

0.0.16

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page