Skip to main content

RTM API wrapper

Project description

codecov PyPI version

Python wrapper for "Remember the Milk" API

Usage of client

from rtmmilk import Client, RTMError, Task

client = Client(API_KEY, SHARED_SECRET, TOKEN)

try:
    client.Add(Task(title='title', tags=['tag1', 'tag2']))
    await client.AddAsync(Task(title='title', tags=['tag1', 'tag2']))
except RTMError as e:
    print(e)

Usage of API functions directly

from rtmmilk import API, RTMError

api = API(API_KEY, SHARED_SECRET, TOKEN)

timeline = api.TimelinesCreate().timeline
try:
    api.TasksAdd(timeline, 'task name')
except RTMError as e:
    print(e)
from rtmmilk import APIAsync, RTMError

apiAsync = APIAsync(API_KEY, SHARED_SECRET, TOKEN)

timeline = await apiAsync.TimelinesCreate().timeline
try:
    await api.TasksAdd(timeline, 'task name')
except RTMError as e:
    print(e)

Authorization

from rtmmilk import AuthorizationSession

authenticationSession = AuthorizationSession(API_KEY, SHARED_SECRET, 'delete')
input(f"Go to {authenticationSession.url} and authorize. Then Press ENTER")
token = authenticationSession.Done()
print(f'Authorization token is {token}')

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

rtmilk-0.0.11.tar.gz (12.9 kB view hashes)

Uploaded Source

Built Distribution

rtmilk-0.0.11-py3-none-any.whl (15.5 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