Skip to main content

mekk.nozbe wraps (noticeable parts of) Nozbe API as Python functions.

It uses both old, officially published API (http://www.nozbe.com/gtd/api) and new (not yet officially docunented) “Sync API”. Neither of those APIs is fully covered (the module supports the functions which were working at early 2009 and which I needed), but still I succesfully use the library to extract projects, contexts and tasks from Nozbe and to create new (or update existing) items.

The code is currently using Twisted network interface (that means returning deferreds etc). Well, I like Twisted. I consider providing urllib-based synchronous API as an alternative, just need some motivation.

nozbetool

Apart from the library, nozbetool script is bundled. Run:

nozbetool --help

for details. Most common usages:

nozbetool export --csv=file.csv --user=YourNozbeUsername

(export to .csv) or:

nozbetool export --json=file.json --user=YourNozbeUsername --completed

(export to .json, completed actions are included).

Note: only .json export contains notes!

Development

Development is tracked on http://bitbucket.org/Mekk/mekk.nozbe/

Example

Some simple example:

from mekk.nozbe import NozbeApi, NozbeConnection
from twisted.internet import reactor, defer

# API KEY servers as an authentication token.
# Check for your own at Nozbe extras page (http://www.nozbe.com/account/extras).
# Note that publishing it is equivalent to publishing the password.
API_KEY = "grab your own from Nozbe"

@defer.inlineCallbacks
def make_some_calls():
    connection =  NozbeConnection(API_KEY)
    nozbe_client = NozbeApi()

    print "* Some projects"
    projects = yield nozbe_client.get_projects()
    for project in projects[:3]:
        print project
    print

    print "* Some contexts"
    contexts = yield nozbe_client.get_contexts()
    for context in contexts[:3]:
        print context
    print

    print "* Some tasks"
    tasks = yield nozbe_client.get_tasks()
    for task in tasks[:3]:
        print task
    print

    print "Adding example task"
    yield nozbe_client.add_task(
        u"Example task made using script",
        project_hash = projects[0]['hash'],
        context_hash = contexts[0]['hash'],
        next = 1)

@defer.inlineCallbacks
def main():
    try:
        yield make_some_calls()
    finally:
        reactor.stop()

reactor.callLater(0, main)
reactor.run()

Release files for mekk.nozbe 0.4.2

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

Source distribution (sdist)

Source distribution for mekk.nozbe 0.4.2
File Size Uploaded
mekk.nozbe-0.4.2.tar.gz 11.7 kB Details

Release files / mekk.nozbe-0.4.2.tar.gz

Download URL mekk.nozbe-0.4.2.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7526cb3357eff5684f332e8ee58e362fc6f3f2e87cbc32bbcab98a5ebc942f1c
BLAKE2b-256 checksum
How to use checksums
1d165f60e3aa47f12702c09c9a6ba6c181ba8731b641d24d94cece4891296e31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.4.2 This release

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

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