rtmilk 0.2.0
pip install rtmilk==0.2.0
Newer version available (3.0.4)
Released:
RTM API wrapper
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Rehan Khwaja
- Tags RememberTheMilk
- Requires: Python >=3.9, <4
Classifiers
- Development Status
- Intended Audience
- License
- Programming Language
Project description
Python wrapper for "Remember the Milk" API
Usage of client
from rtmilk import Client, RTMError
# These are the equivalent objects, created differently
client = Client.Create(API_KEY, SHARED_SECRET, TOKEN)
client2 = await Client.CreateAsync(API_KEY, SHARED_SECRET, TOKEN)
try:
task = client.Add(name='name 1')
assert task.complete.value is False
task.tags.Set({'tag1', 'tag2'})
assert task.tags.value == ['tag1', 'tag2']
task = await client.AddAsync(name='name 2')
await task.tags.Set({'tag1', 'tag2'})
tasks = client2.Get('name:"name 1"')
assert tasks[0].tags.value == ['tag1', 'tag2']
except RTMError as e:
print(e)
Usage of API functions directly
from rtmilk 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 rtmilk import APIAsync, RTMError
apiAsync = APIAsync(API_KEY, SHARED_SECRET, TOKEN)
timeline = await apiAsync.TimelinesCreate().timeline
try:
await apiAsync.TasksAdd(timeline, 'task name')
except RTMError as e:
print(e)
Authorization
from rtmilk 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
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Rehan Khwaja
- Tags RememberTheMilk
- Requires: Python >=3.9, <4
Classifiers
- Development Status
- Intended Audience
- License
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file rtmilk-0.2.0.tar.gz
.
File metadata
- Download URL: rtmilk-0.2.0.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.2 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
d8d4e965650b769f06f774db1de9ccd66491d73a973b73a7b67ef066bd0b6dd7
|
|
MD5 |
913c697999a8577f8bf9011499ee4065
|
|
BLAKE2b-256 |
b9f82ee3c2021f058c55ae8f5bce42db1ba26bce3d54a8b6e33399c4b6f5c24e
|
File details
Details for the file rtmilk-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: rtmilk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.2 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
627aeb88995a3eac228f4a61cd24c0953af24c595ff329ad16ceb1fe2082d414
|
|
MD5 |
0f921bf06cb9c72d73e5f4c6751b800c
|
|
BLAKE2b-256 |
33ab0d5d26b4d11e9dde9ec4b848af747d07311cb6bd93cbdbca80f5aff46900
|