Metadata-Version: 2.4
Name: pymstodo
Version: 0.2.1
Summary: Microsoft To Do API client
Home-page: https://github.com/inbalboa/pymstodo
Author: Serhiy Shliapuhin
Author-email: shlyapugin@gmail.com
License: GPLv3
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10,<4.0
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests_oauthlib>=1.3.0
Requires-Dist: defusedxml>=0.7.1
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# pymstodo ✔️
[![PyPI](https://img.shields.io/pypi/v/pymstodo.svg)](https://pypi.org/project/pymstodo/) [![Build Status](https://github.com/inbalboa/pymstodo/actions/workflows/main.yml/badge.svg)](https://github.com/inbalboa/pymstodo/actions/workflows/main.yml) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

### Python wrapper to deal with [Microsoft To Do](https://to-do.live.com).

## Installation
```
pip3 install pymstodo
```

## Requirements
* python >= 3.10
* requests_oauthlib >= 1.3.0

## Usage
1. [Get an API key](https://github.com/inbalboa/pymstodo/blob/master/GET_KEY.md) before using `pymstodo`.
2. Use it to initialize the client. Here is an example:
```python
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')
```
3. Full documentation: https://inbalboa.github.io/pymstodo/

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