Skip to main content

A simple Python 3 library to read your Things app data.

Project description

Things Python API

things.py is a simple Python 3 library to read data from your Things app.

GitHub Release Build Status Coverage Status Maintainability Rating GitHub Issues License PyPI - Downloads GitHub Download Count

Table of Contents

Install

$ pip3 install things.py
# or
$ git clone https://github.com/thingsapi/things.py && cd things.py && make install

Examples

>>> import things
>>> things.todos()
[{'uuid': '2Ukg8I2nLukhyEM7wYiBeb',
  'type': 'to-do',
  'title': 'Make reservation for dinner',
  'project': 'bNj6TPdKYhY6fScvXWVRDX',
  ...},
 {'uuid': 'RLZroza3jz0XPs3uAlynS7',
  'type': 'to-do',
  'title': 'Buy a whiteboard and accessories',
  'project': 'w8oSP1HjWstPin8RMaJOtB',
  'notes': "Something around 4' x 3' that's free-standing, two-sided, and magnetic.",
  'checklist': True,
  ...
>>> things.todos('RLZroza3jz0XPs3uAlynS7')
{'uuid': 'RLZroza3jz0XPs3uAlynS7',
 'type': 'to-do',
 'title': 'Buy a whiteboard and accessories',
 ...
 'checklist': [
     {'title': 'Cleaning Spray', 'status': 'completed', ...},
     {'title': 'Magnetic Eraser', 'status': 'incomplete', ...},
     {'title': 'Round magnets', 'status': 'incomplete', ...}
 ]
 ...
}

>>> things.projects()
[{'uuid': 'bNj6TPdKYhY6fScvXWVRDX',
  'type': 'project',
  'title': 'Throw Birthday Party',
  'area': 'bNj6TPdKYhY6fScvXWVRDX',
  ...},
 {'uuid': 'w8oSP1HjWstPin8RMaJOtB',
  'type': 'project',
  'title': 'Set Up Home Office',
  'area': 'Gw9QefIdgR6nPEoY5hBNSh',
  ...

>>> things.areas()
[{'uuid': 'ToLxnnBrWkfHC3tkx4vxdV',
  'type': 'area',
  'title': 'Family',
  ...},
 {'uuid': 'Gw9QefIdgR6nPEoY5hBNSh',
  'type': 'area',
  'title': 'Apartment',
  ...

>>> things.tags()
[{'uuid': 'CKILg3kKF2jlCRisNFcqOj',
  'type': 'tag',
  'title': 'Home',
  'shortcut': None},
 {'uuid': 'gfmpz8zxnyfqMDvRi3E8vo',
  'type': 'tag',
  'title': 'Office',
  'shortcut': None},
 ...

>>> things.get('CKILg3kKF2jlCRisNFcqOj')
{'uuid': 'CKILg3kKF2jlCRisNFcqOj',
  'type': 'tag',
  'title': 'Home',
  'shortcut': None}

Background

The task management app Things stores all your to-dos in a SQLite database file (details here). This format is intended to be machine-readable, not human-readable. The aim of this project is to let you access all your Things data in a human-readable way. We thereby stay as true to the database as possible while doing SQL joins and transformations to aid understanding of the data. Note that you can print the SQL used by adding the parameter print_sql=True to most API calls.

If any aspect of the API seems overly complex or doesn't meet your needs, please don't hesitate to add a new issue here.

Terminology

Here are the core technical terms used involving the database:

  • area
  • tag
  • task
    • type
      • 'to-do': can have checklists;
      • 'project': can have to-dos and headings;
      • 'heading': part of a project; groups to-dos.
    • status: 'incomplete', 'canceled', or 'completed'
    • trashed: True or False
    • start: 'Inbox', 'Anytime', or 'Someday'
  • checklist item (contained within a to-do)

Documentation

The full documentation for this library can be found here: https://thingsapi.github.io/things.py/things/api.html

Things URL Scheme

You can make good use of the uuid to link to to-dos, areas, tags, and more from other apps. Doing updates are possible as well. Read an introduction here and see the documentation here.

Contributing

We welcome contributions to things.py! Before submitting a pull request, please take a moment to look over the contributing guidelines first.

Used By

The following open-source projects make use of this library:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

things_py-1.0.0.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

things_py-1.0.0-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

Details for the file things_py-1.0.0.tar.gz.

File metadata

  • Download URL: things_py-1.0.0.tar.gz
  • Upload date:
  • Size: 30.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for things_py-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ee8ce62374d23d9570a4bc418a9b4d42668e052e8378e58da24af14ce21d89f1
MD5 7266197ec2f2533023013824c7090de4
BLAKE2b-256 d6d1ac2d577cb7a4d25a96c0149729b198aa9d4f9505811b6ea2cb39d01fb281

See more details on using hashes here.

File details

Details for the file things_py-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: things_py-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 29.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for things_py-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9bc6ca020f49f3686ae9cd2a610ca8f008bd990c6d08b17b3eb80c2eb19dcf69
MD5 382f40fe3defd92cfee2f0d3f9a8073c
BLAKE2b-256 e4313ac1f88d40a9f03d761e08be9c89f6419b41e8be7941c3909929445df246

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page