Skip to main content

Microsoft To Do API client

Project description

pymstodo ✔️

PyPI Build Status License: GPL v3

Python wrapper to deal with Microsoft To Do.

Installation

pip3 install pymstodo

Requirements

  • python >= 3.10
  • requests_oauthlib >= 1.3.0

Usage

  1. Get an API key before using pymstodo.
  2. Use it to initialize client. Here is an example:
from pymstodo import ToDoConnection

client_id = 'PLACE YOUR CLIENT ID'
client_secret = 'PLACE YOUR CLIENT SECRET'

auth_url = ToDoConnection.get_auth_url(client_id)
redirect_resp = input(f'Go here and authorize:\n{auth_url}\n\nPaste the full redirect URL below:\n')
token = ToDoConnection.get_token(client_id, client_secret, redirect_resp)  # you have to save it somewhere
print(token)
todo_client = ToDoConnection(client_id=client_id, client_secret=client_secret, token=token)

lists = todo_client.get_lists()
task_list = lists[0]
tasks = todo_client.get_tasks(task_list.list_id)

print(task_list)
print(*tasks, sep='\n')
  1. Full documentation: https://inbalboa.github.io/pymstodo/

  2. API description by Microsoft see at https://docs.microsoft.com/en-us/graph/api/resources/todo-overview

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

pymstodo-0.2.0.tar.gz (21.2 kB view hashes)

Uploaded Source

Built Distribution

pymstodo-0.2.0-py3-none-any.whl (20.8 kB view hashes)

Uploaded Python 3

Supported by

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