thingsapi/things.py

Ask others to use (and extend) this library

Closed this issue · 5 comments

I think we're at a stage where we could write a short note at Reddit. Quick draft, please edit directly in this update:

Where: https://www.reddit.com/r/thingsapp/
Title: Python API and CLI for read-only access of the Things database
Content:

Hi all,

we've been busy writing a Python API and CLI for read-only access of the Things database. It might come in handy for your projects, so have a look at test it via our Github Organization ThingsAPI.

Best regards, Alex & Michael

mikez commented

@AlexanderWillner Good idea. Another strategy might be to answer people directly on queries they have and show how things.py solves this.

For example, to get the SQL query for Today, you can do

pip install things.py

and then

import things
things.today(print_sql=True)

And then you could add:

However, since the Things database structure might change in the future and break your code, a more convenient way might be to work directly with the Things API. If the database structure changes, we can all benefit from each others solutions.

Suggestion:

With respect to your query to the things database, using things.py might help to figure out how to achieve your goal:

$ pip3 install things.py && python3 -c "import things ; things.today(print_sql=True)"

Template for reddit:

We've developed a (read-only) API and CLI library for accessing the Things database at https://github.com/thingsapi. This might might be handy if you're already accessing the database programmatically or want to access it from the command line.

For example, as a user, to get the tasks for today, you can run

    $ things-cli today
    ...

For example, as a programmer, to get the SQL query for Today, you can execute

    $ pip3 install things.py && python3 -c "import things ; things.today(print_sql=True)"
    ...

However, since the Things database structure might change in the future and break your code, a more convenient way might be to work directly with the Things API. If the database structure changes, we can all benefit from each others solutions.

Closing; feel free to reopen if you want to keep doing marketing.