Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rtmilk

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rtmilk

Remember The Milk API wrapper

  • 3.0.2
  • PyPI
  • Socket score

Maintainers
1

codecov PyPI version

Python wrapper for "Remember the Milk" API

  • Asynchronous and synchronous APIs
  • Subscription support

Usage of client

from rtmilk import APIError, CreateClient, CreateClientAsync

# These are the equivalent objects, created differently
client = CreateClient(API_KEY, SHARED_SECRET, TOKEN)
client2 = await CreateClientAsync(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.SetAsync({'tag1', 'tag2'})
    tasks = client2.Get('name:"name 1"')
    assert tasks[0].tags.value == {'tag1', 'tag2'}
except APIError as e:
    print(e)

Usage of API functions directly

from rtmilk import API, FailStat

api = API(API_KEY, SHARED_SECRET, TOKEN)

timeline = api.TimelinesCreate().timeline
result = api.TasksAdd(timeline, 'task name')
if isinstance(result, FailStat):
    print(f'Error: {result}')
from rtmilk import APIAsync, FailStat

apiAsync = APIAsync(API_KEY, SHARED_SECRET, TOKEN)

timeline = await apiAsync.TimelinesCreate().timeline
result = await apiAsync.TasksAdd(timeline, 'task name')
if isinstance(result, FailStat):
    print(f'Error: {result}')

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}')

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc