Skip to main content

Overview

Wunderpy2 is a thin Python library for accessing the official Wunderlist 2 API. What does a thin library mean here?

  1. Only the bare minimum of error-checking to pass the Wunderlist API specifications is performed (e.g. there’s no checking whether a task’s title is empty, even though the Wunderlist web client enforces nonempty titles).

  2. There aren’t any ‘convenience’ functions, like getting a list by name instead of ID (that being said, I’ll likely get tired of repeating the same things myself, write a few, and bundle them in a separate helper module).

Installation

pip install wunderpy2

Usage & Examples

Getting a client

Wunderlist uses OAuth2 to allow applications to access users’ data, so you’ll need to create an application before doing anything. If you only want to access your own Wunderlist, generate an access token after creating your application and use it and the client ID as follows:

import wunderpy2
api = wunderpy2.WunderApi()
client = api.get_client(access_token, client_id)    # Fill in your values

If you want other Wunderlisters to use your application, you’ll need to see the “Redirect users to request Wunderlist access” section of the authorization docs in order to get a temporary code when a user has authorized your app. Once you have the code, you only need one more step:

api = wunderpy2.WunderApi()
access_token = api.get_access_token(temporary_code, client_id, client_secret)   # Fill in your values here
client = api.get_client(access_token, client_id)    # Fill in your client ID

Wunderlist Objects

All Wunderlist objects are merely Python objects with special keys. For convenience, these keys are laid out in a class format in model.py. Note that not every object will have every key (e.g. List objects with type ‘inbox’ do not have creation metadata).

Examples

Creating a task with a due date, note, ‘starred’ flag, and subtask:

lists = client.get_lists()
list = lists[0]
task = client.create_task(1234, "My new task", due_date="2015-08-02", starred=True)
client.create_note(task[wunderpy2.Task.ID], "My note")
client.create_subtask(task[wunderpy2.Task.ID], "My subtask")

Shuffling the order of tasks within a list (see the Positions endpoint documentation):

import random
task_positions_obj = client.get_task_positions_obj(list[wunderpy2.List.ID])
ordering = task_positions_obj[wunderpy2.Task.VALUES]
random.shuffle(ordering)
client.update_task_positions_obj(task_positions_obj[wunderpy2.TaskPositionsObj.ID], task_positions_obj[wunderpy2.TaskPositionsObj.REVISION], ordering)

TODO

  • Endpoint implementation:
    • Avatar

    • File

    • File preview

    • Folder

    • Reminder

    • Task comment

    • Upload

    • User

    • Webhooks?

Release History

0.1.6 (2018-07-27) — * Fix typo in RecurrenceTypes class name

0.1.5 (2018-07-27) — * Switch from dict.iteritems() to dict.items() for Python 2 & 3 compatibility * Expose a few more classes in the public-facing API

0.1.4 (2016-03-14)

  • Bugfix in task endpoint code

0.1.3 (2016-03-12)

  • Fix imports for Python 3

0.1.2 (2015-10-31)

  • Added ‘position’ endpoint

  • Added ‘subtask’ endpoint

0.1.1 (2015-08-16)

  • Fixed setup.py requiring ‘argparse’ module for Python >2.6

0.1.0 (2015-08-15)

  • Initial release

wunderpy2 is written and maintained by mieubrisse

Contributors

Nobody yet!

Metadata

Release files for wunderpy2 0.1.6

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

Source distribution (sdist)

Source distribution for wunderpy2 0.1.6
File Size Uploaded Provenance
wunderpy2-0.1.6.tar.gz 12.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for wunderpy2 0.1.6
File Interpreter ABI Platform
wunderpy2-0.1.6-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 29.6 kB

Release files / wunderpy2-0.1.6.tar.gz

Download URL wunderpy2-0.1.6.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8845c5d2f9794de3c42f206bc3387b364e8f01817728ac7e3be6980bdbb9dd43
BLAKE2b-256 checksum
How to use checksums
706921a3150434f585d3400c2a694dd4410b50fe22a1ccca8cf262c4e7084677
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/38.5.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.4

Release files / wunderpy2-0.1.6-py2.py3-none-any.whl

Download URL wunderpy2-0.1.6-py2.py3-none-any.whl
Size 17.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ffefc0c099e4876aa98a486bed5442cd0d18d9a469b750ed195c5ad4b3ea4567
BLAKE2b-256 checksum
How to use checksums
f1518585e5e11dcd9f292420022de390f8ddfcb6e8be8bb821a60df65f78b8b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/38.5.1 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.4

Security for wunderpy2 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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