Reminders Module Reference

New in version 0.0.1.

Control the macOS Reminders application using JXA-like syntax.

Classes:

XARemindersAccount(properties)

An account in the Reminders application.

XARemindersAccountList(properties[, filter])

A wrapper around lists of accounts that employs fast enumeration techniques.

XARemindersAlarm(properties)

An alarm attached to a reminder.

XARemindersAlarmList(properties[, filter])

A wrapper around lists of reminder alarms that employs fast enumeration techniques.

XARemindersApplication(properties)

A class for managing and interacting with scripting elements of the Reminders application.

XARemindersDocument(properties)

A document in the Reminders application.

XARemindersDocumentList(properties[, filter])

A wrapper around lists of documents that employs fast enumeration techniques.

XARemindersList(properties)

A class for...

XARemindersListList(properties[, filter])

A wrapper around lists of reminder lists that employs fast enumeration techniques.

XARemindersRecurrenceRule(properties)

A class for interacting with Reminders.

XARemindersReminder(properties)

A reminder in Reminders.app.

XARemindersReminderList(properties[, filter])

A wrapper around lists of reminders that employs fast enumeration techniques.

XARemindersWindow(properties)

A window of the Reminders application.

class PyXA.apps.Reminders.XARemindersAccount(properties)[source]

Bases: XAObject

An account in the Reminders application.

Attributes:

id

The unique identifier of the account.

name

The name of the account.

properties

All properties of the account.

Methods:

show()

Shows the account in the front window.

property id: str

The unique identifier of the account.

property name: str

The name of the account.

property properties: dict

All properties of the account.

show() XARemindersAccount[source]

Shows the account in the front window.

Returns:

The account object

Return type:

XARemindersAccount

New in version 0.0.6.

class PyXA.apps.Reminders.XARemindersAccountList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of accounts that employs fast enumeration techniques.

All properties of accounts can be called as methods on the wrapped list, returning a list containing each account’s value for the property.

New in version 0.0.6.

Methods:

by_id(id)

by_name(name)

by_properties(properties)

id()

name()

properties()

by_id(id: str) XARemindersAccount | None[source]
by_name(name: str) XARemindersAccount | None[source]
by_properties(properties: dict) XARemindersAccount | None[source]
id() list[str][source]
name() list[str][source]
properties() list[dict][source]
class PyXA.apps.Reminders.XARemindersAlarm(properties)[source]

Bases: XAObject

An alarm attached to a reminder.

New in version 0.0.2.

Attributes:

date

The date and time of a date-based alarm.

id

A unique identifier for this alarm.

location

proximity_direction

Whether a location-based alarm is for arriving or departing.

snoozed

Whether the alarm is snoozed.

Methods:

set_date(date)

Sets the date and time of the alarm.

set_location(location)

Sets the location and radius of the alarm.

property date: datetime

The date and time of a date-based alarm.

property id: str

A unique identifier for this alarm.

property location: XALocation
property proximity_direction: str

Whether a location-based alarm is for arriving or departing.

set_date(date: datetime)[source]

Sets the date and time of the alarm.

Parameters:

date (datetime) – The absolute date that the alarm will go off.

New in version 0.0.2.

set_location(location: XALocation)[source]

Sets the location and radius of the alarm.

Parameters:

location (XABase.XALocation) – The location (with specified radius) that the alarm will go off.

New in version 0.0.2.

property snoozed: bool

Whether the alarm is snoozed.

class PyXA.apps.Reminders.XARemindersAlarmList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of reminder alarms that employs fast enumeration techniques.

All properties of alarms can be called as methods on the wrapped list, returning a list containing each alarm’s value for the property.

New in version 0.0.6.

Methods:

by_date(date)

by_id(id)

by_location(location)

by_proximity_direction(proximity_direction)

by_snoozed(snoozed)

date()

id()

location()

proximity_direction()

snoozed()

by_date(date: datetime) XARemindersAlarm | None[source]
by_id(id: str) XARemindersAlarm | None[source]
by_location(location: XALocation) XARemindersAlarm | None[source]
by_proximity_direction(proximity_direction: str) XARemindersAlarm | None[source]
by_snoozed(snoozed: bool) XARemindersAlarm | None[source]
date() list[datetime][source]
id() list[str][source]
location() list[XALocation][source]
proximity_direction() list[str][source]
snoozed() list[bool][source]
class PyXA.apps.Reminders.XARemindersApplication(properties)[source]

Bases: XASBApplication

A class for managing and interacting with scripting elements of the Reminders application.

New in version 0.0.1.

Classes:

ObjectType(value)

The types of objects that can be created using make().

Methods:

accounts([filter])

Returns a list of accounts, as PyXA objects, matching the given filter.

documents([filter])

Returns a list of documents, as PyXA objects, matching the given filter.

lists([filter])

Returns a list of reminder lists, as PyXA objects, matching the given filter.

make(specifier[, properties, data])

Creates a new element of the given specifier class without adding it to any list.

new_list([name, color, emblem])

Creates a new reminder with the given name, body, and due date in the specified reminder list.

new_reminder([name, due_date, reminder_list])

Creates a new reminder with the given name, body, and due date in the specified reminder list.

reminders([filter])

Returns a list of reminders, as PyXA objects, matching the given filter.

Attributes:

default_account

The default account in the Reminders application.

default_list

The default list in the Reminders application.

frontmost

Whether Reminders is the active application.

name

The name of the application.

version

The version number of Reminders.app.

class ObjectType(value)[source]

Bases: Enum

The types of objects that can be created using make().

Attributes:

DOCUMENT

LIST

REMINDER

DOCUMENT = 'document'
LIST = 'list'
REMINDER = 'reminder'
accounts(filter: dict | None = None) XARemindersAccountList[source]

Returns a list of accounts, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned accounts will have, or None

Returns:

The list of accounts

Return type:

XARemindersAccountList

New in version 0.0.6.

property default_account: XARemindersAccount

The default account in the Reminders application.

property default_list: XARemindersList

The default list in the Reminders application.

documents(filter: dict | None = None) XARemindersDocumentList[source]

Returns a list of documents, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned documents will have, or None

Returns:

The list of documents

Return type:

XARemindersDocumentList

New in version 0.0.6.

property frontmost: bool

Whether Reminders is the active application.

lists(filter: dict | None = None) XARemindersListList[source]

Returns a list of reminder lists, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned lists will have, or None

Returns:

The list of reminder lists

Return type:

XARemindersListList

New in version 0.0.6.

make(specifier: str | ObjectType, properties: dict | None = None, data: Any | None = None)[source]

Creates a new element of the given specifier class without adding it to any list.

Use XABase.XAList.push() to push the element onto a list.

Parameters:
  • specifier (Union[str, XARemindersApplication.ObjectType]) – The classname of the object to create

  • properties (dict) – The properties to give the object

  • data (Any, optional) – The data to initialize the object with, defaults to None

Returns:

A PyXA wrapped form of the object

Return type:

XABase.XAObject

New in version 0.0.6.

property name: str

The name of the application.

new_list(name: str = 'New List', color: str = '#FF0000', emblem: str = 'symbol0') XARemindersList[source]

Creates a new reminder with the given name, body, and due date in the specified reminder list.

If no list is provided, the reminder is created in the default list.

Parameters:
  • title – The name of the list, defaults to “New List”

  • color (str, optional) – The HEX color of the list’s icon.

  • emblem (str, optional) – The symbol to use as the list’s icon.

Returns:

A reference to the newly created list.

Return type:

XAReminderList

New in version 0.0.1.

new_reminder(name: str = 'New Reminder', due_date: datetime | None = None, reminder_list: XARemindersList | None = None) XARemindersReminder[source]

Creates a new reminder with the given name, body, and due date in the specified reminder list. If no list is provided, the reminder is created in the default list.

Parameters:
  • title (str, optional) – The name of the reminder, defaults to “New Reminder”

  • notes (str, optional) – The text notes attached to the reminder, defaults to “”

  • due_date (datetime, optional) – The date and time when the reminder will be due.

  • reminder_list (XAReminderList, optional) – The list that the new reminder will be added to.

Returns:

A reference to the newly created reminder.

Return type:

XAReminder

Example:

>>> from datetime import datetime, timedelta
>>> import PyXA
>>> app = PyXA.Application("Reminder")
>>> due_date = datetime.now() + timedelta(hours = 1)
>>> reminder = app.new_reminder("Read PyXA listation", "Complete 1 tutorial", due_date)
>>> print(reminder.id)
B0DD7836-7C05-48D4-B806-D6A76317452E

See also

XAReminder, new_list()

New in version 0.0.1.

reminders(filter: dict | None = None) XARemindersReminderList[source]

Returns a list of reminders, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned reminders will have, or None

Returns:

The list of reminders

Return type:

XARemindersReminderList

New in version 0.0.6.

property version: str

The version number of Reminders.app.

class PyXA.apps.Reminders.XARemindersDocument(properties)[source]

Bases: XAObject

A document in the Reminders application.

New in version 0.0.6.

Methods:

close([save, location])

Closes a document.

delete()

Deletes the document.

duplicate()

Copies an object.

move_to(window)

Move an object to a new location.

print(properties[, show_dialog])

Prints a document.

save()

Saves a document.

Attributes:

file

The location of the document on disk, if it has one.

modified

Whether the document has been modified since it was last saved.

name

The name of the document.

properties

All properties of the document.

close(save: bool = True, location: str | NSURL | None = None) None[source]

Closes a document.

delete() None[source]

Deletes the document.

duplicate() None[source]

Copies an object.

property file: XAPath

The location of the document on disk, if it has one.

property modified: bool

Whether the document has been modified since it was last saved.

move_to(window: XARemindersWindow) None[source]

Move an object to a new location.

property name: str

The name of the document.

print(properties: dict, show_dialog: bool = True) None[source]

Prints a document.

property properties: dict

All properties of the document.

save() None[source]

Saves a document.

class PyXA.apps.Reminders.XARemindersDocumentList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of documents that employs fast enumeration techniques.

All properties of documents can be called as methods on the wrapped list, returning a list containing each document’s value for the property.

New in version 0.0.6.

Methods:

by_file(file)

by_modified(modified)

by_name(name)

by_properties(properties)

file()

modified()

name()

properties()

by_file(file: XAPath) XARemindersDocument | None[source]
by_modified(modified: bool) XARemindersDocument | None[source]
by_name(name: str) XARemindersDocument | None[source]
by_properties(properties: dict) XARemindersDocument | None[source]
file() list[XAPath][source]
modified() list[dict][source]
name() list[dict][source]
properties() list[dict][source]
class PyXA.apps.Reminders.XARemindersList(properties)[source]

Bases: XAObject

A class for…

Attributes:

color

The color of the list.

container

The container of the list.

emblem

The emblem icon name of the list.

id

The unique identifier of the list.

name

The name of the list.

properties

All properties of the list.

sharees

A list of individuals with whom the list is shared with

sharing_status

Whether the list is shared

subscription_url

The URL of the list used to subscribe to it

summary

An overview of the list's information

Methods:

delete()

Deletes the list.

reminders([filter])

Returns a list of reminders, as PyXA objects, matching the given filter.

show()

Shows the list in the front Reminders window.

property color: str

The color of the list.

property container: XARemindersAccount | XARemindersList

The container of the list.

delete() None[source]

Deletes the list.

New in version 0.0.6.

property emblem: str

The emblem icon name of the list.

property id: str

The unique identifier of the list.

property name: str

The name of the list.

property properties: dict

All properties of the list.

reminders(filter: dict | None = None) XARemindersReminderList[source]

Returns a list of reminders, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned reminders will have, or None

Returns:

The list of reminders

Return type:

XARemindersReminderList

New in version 0.0.6.

sharees

A list of individuals with whom the list is shared with

sharing_status: bool

Whether the list is shared

show() XARemindersList[source]

Shows the list in the front Reminders window.

Returns:

The list object

Return type:

XARemindersList

New in version 0.0.6.

subscription_url

The URL of the list used to subscribe to it

summary

An overview of the list’s information

class PyXA.apps.Reminders.XARemindersListList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of reminder lists that employs fast enumeration techniques.

All properties of reminder lists can be called as methods on the wrapped list, returning a list containing each list’s value for the property.

New in version 0.0.6.

Methods:

by_color(color)

by_container(container)

by_emblem(emblem)

by_id(id)

by_name(name)

by_properties(properties)

color()

container()

delete()

Deletes all reminder lists in the list.

emblem()

id()

name()

properties()

reminders()

by_color(color: str) XARemindersList | None[source]
by_container(container: XARemindersList) XARemindersList | None[source]
by_emblem(emblem: str) XARemindersList | None[source]
by_id(id: str) XARemindersList | None[source]
by_name(name: str) XARemindersList | None[source]
by_properties(properties: dict) XARemindersList | None[source]
color() list[dict][source]
container() XARemindersAccountList[source]
delete()[source]

Deletes all reminder lists in the list.

New in version 0.0.6.

emblem() list[str][source]
id() list[str][source]
name() list[dict][source]
properties() list[dict][source]
reminders() XARemindersReminderList[source]
class PyXA.apps.Reminders.XARemindersRecurrenceRule(properties)[source]

Bases: XAObject

A class for interacting with Reminders.

New in version 0.0.2.

Attributes:

end_date

The end date and time of recurrence.

frequency

Specifier for the base unit of recurrence, i.e. daily, weekly, monthly, or yearly.

interval

The number of frequency units between recurrences.

Methods:

set_end_date(end_date)

Sets the date and time when the recurrence ends.

set_frequency(frequency)

Sets the frequency of recurrence.

set_interval(interval)

Sets the interval of recurrence.

property end_date: datetime

The end date and time of recurrence.

property frequency: str

Specifier for the base unit of recurrence, i.e. daily, weekly, monthly, or yearly.

property interval: int

The number of frequency units between recurrences.

set_end_date(end_date: datetime)[source]

Sets the date and time when the recurrence ends.

Parameters:

end_date (datetime) – The absolute end day of recurrence.

New in version 0.0.2.

set_frequency(frequency: Literal['daily', 'weekly', 'monthly', 'yearly'])[source]

Sets the frequency of recurrence.

Parameters:

frequency (Literal["daily", "weekly", "monthly", "yearly"]) – A specifier for the base unit of recurrence.

New in version 0.0.2.

set_interval(interval: int)[source]

Sets the interval of recurrence.

Parameters:

interval (int) – The interval; the number of frequency units between recurrences.

New in version 0.0.2.

class PyXA.apps.Reminders.XARemindersReminder(properties)[source]

Bases: XAObject

A reminder in Reminders.app.

New in version 0.0.6.

Methods:

alarms([filter])

Returns a list of alarms, as PyXA objects, matching the given filter.

delete()

Deletes the reminder.

move_to(list)

Moves the reminder to the specified list.

show()

Shows the reminder in the front Reminders window.

Attributes:

all_day

Whether the reminder is all day or a specific time.

allday_due_date

The all-day due date of the reminder; will only set a date.

body

The notes attached to the reminder.

completed

Whether the reminder is completed.

completion_date

The completion date of the reminder.

container

The container of the reminder.

creation_date

The creation date of the reminder.

due_date

The due date of the reminder; will set both date and time.

flagged

Whether the reminder is flagged.

id

The unique identifier of the reminder.

modification_date

The modification date of the reminder.

name

The name of the reminder.

notes

User-inputted notes for this reminder.

priority

The priority of the reminder; 0: no priority, 1–4: high, 5: medium, 6–9: low.

properties

All properties of the reminder.

recurrence_rule

The recurrence rule for the reminder.

remind_me_date

The remind date of the reminder.

url

The URL attached to the reminder, if there is one.

alarms(filter: dict | None = None) XARemindersAlarmList[source]

Returns a list of alarms, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned alarms will have, or None

Returns:

The list of alarms

Return type:

XARemindersAlarmList

New in version 0.0.6.

property all_day: bool

Whether the reminder is all day or a specific time.

New in version 0.0.6.

property allday_due_date: datetime | None

The all-day due date of the reminder; will only set a date.

New in version 0.0.6.

property body: str

The notes attached to the reminder.

New in version 0.0.6.

property completed: bool

Whether the reminder is completed.

New in version 0.0.6.

property completion_date: datetime | None

The completion date of the reminder.

New in version 0.0.6.

property container: XARemindersList | XARemindersReminder

The container of the reminder.

New in version 0.0.6.

property creation_date: datetime

The creation date of the reminder.

New in version 0.0.6.

delete() None[source]

Deletes the reminder.

New in version 0.0.6.

property due_date: datetime | None

The due date of the reminder; will set both date and time.

New in version 0.0.6.

property flagged: bool

Whether the reminder is flagged.

New in version 0.0.6.

property id: str

The unique identifier of the reminder.

New in version 0.0.6.

property modification_date: datetime

The modification date of the reminder.

New in version 0.0.6.

move_to(list: XARemindersList) XARemindersReminder[source]

Moves the reminder to the specified list.

Parameters:

list (XARemindersList) – The list to move the reminder to

Returns:

The moved reminder object

Return type:

XARemindersReminder

New in version 0.0.6.

property name: str

The name of the reminder.

New in version 0.0.6.

property notes: str

User-inputted notes for this reminder.

New in version 0.0.6.

property priority: int

The priority of the reminder; 0: no priority, 1–4: high, 5: medium, 6–9: low.

New in version 0.0.6.

property properties: dict

All properties of the reminder.

New in version 0.0.6.

property recurrence_rule: XARemindersRecurrenceRule

The recurrence rule for the reminder.

New in version 0.0.6.

property remind_me_date: datetime | None

The remind date of the reminder.

New in version 0.0.6.

show() XARemindersReminder[source]

Shows the reminder in the front Reminders window.

Returns:

The reminder object

Return type:

XARemindersReminder

New in version 0.0.6.

property url: XAURL

The URL attached to the reminder, if there is one.

New in version 0.0.6.

class PyXA.apps.Reminders.XARemindersReminderList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of reminders that employs fast enumeration techniques.

All properties of reminders can be called as methods on the wrapped list, returning a list containing each reminder’s value for the property.

New in version 0.0.6.

Methods:

alarms()

allday_due_date()

body()

by_allday_due_date(allday_due_date)

by_body(body)

by_completed(completed)

by_completion_date(completion_date)

by_container(container)

by_creation_date(creation_date)

by_due_date(due_date)

by_flagged(flagged)

by_id(id)

by_modification_date(modification_date)

by_name(name)

by_priority(priority)

by_properties(properties)

by_remind_me_date(remind_me_date)

completed()

completion_date()

container()

creation_date()

delete()

Deletes all reminders in the list.

due_date()

flagged()

id()

modification_date()

move_to(list)

Moves all reminders in the list to the specified reminder list.

name()

priority()

properties()

remind_me_date()

alarms() list[XARemindersAlarmList][source]
allday_due_date() list[datetime][source]
body() list[str][source]
by_allday_due_date(allday_due_date: datetime) XARemindersReminder | None[source]
by_body(body: str) XARemindersReminder | None[source]
by_completed(completed: bool) XARemindersReminder | None[source]
by_completion_date(completion_date: datetime) XARemindersReminder | None[source]
by_container(container: XARemindersList) XARemindersReminder | None[source]
by_creation_date(creation_date: datetime) XARemindersReminder | None[source]
by_due_date(due_date: datetime) XARemindersReminder | None[source]
by_flagged(flagged: bool) XARemindersReminder | None[source]
by_id(id: str) XARemindersReminder | None[source]
by_modification_date(modification_date: datetime) XARemindersReminder | None[source]
by_name(name: str) XARemindersReminder | None[source]
by_priority(priority: int) XARemindersReminder | None[source]
by_properties(properties: dict) XARemindersReminder | None[source]
by_remind_me_date(remind_me_date: datetime) XARemindersReminder | None[source]
completed() list[bool][source]
completion_date() list[datetime][source]
container() XARemindersListList[source]
creation_date() list[datetime][source]
delete()[source]

Deletes all reminders in the list.

New in version 0.0.6.

due_date() list[datetime][source]
flagged() list[bool][source]
id() list[str][source]
modification_date() list[datetime][source]
move_to(list: XARemindersList)[source]

Moves all reminders in the list to the specified reminder list.

Parameters:

list (XARemindersList) – The list to move reminders into

New in version 0.0.6.

name() list[str][source]
priority() list[int][source]
properties() list[dict][source]
remind_me_date() list[datetime][source]
class PyXA.apps.Reminders.XARemindersWindow(properties)[source]

Bases: XASBWindow

A window of the Reminders application.

New in version 0.0.6.

Methods:

close([save])

Closes the window.

lists([filter])

Returns a list of reminder lists, as PyXA objects, matching the given filter.

print(properties[, show_dialog])

Prints the window.

reminders([filter])

Returns a list of reminders, as PyXA objects, matching the given filter.

save()

Saves the current document of the window.

Attributes:

document

The document whose contents are displayed in the window.

close(save: bool = True) None[source]

Closes the window.

Parameters:

save (bool, optional) – Whether to save the current document before closing, defaults to True

Returns:

The window object

Return type:

XARemindersDocument

New in version 0.0.6.

property document: XARemindersDocument

The document whose contents are displayed in the window.

lists(filter: dict | None = None) XARemindersListList[source]

Returns a list of reminder lists, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned lists will have, or None

Returns:

The list of reminder lists

Return type:

XARemindersListList

New in version 0.0.6.

print(properties: dict, show_dialog: bool = True) XARemindersWindow[source]

Prints the window.

Parameters:
  • properties (dict) – The settings to pre-populate the print dialog with

  • show_dialog (bool, optional) – Whether to show the print dialog or skip right to printing, defaults to True

Returns:

The window object

Return type:

XARemindersWindow

New in version 0.0.6.

reminders(filter: dict | None = None) XARemindersReminderList[source]

Returns a list of reminders, as PyXA objects, matching the given filter.

Parameters:

filter (Union[dict, None]) – A dictionary specifying property-value pairs that all returned reminders will have, or None

Returns:

The list of reminders

Return type:

XARemindersReminderList

New in version 0.0.6.

save() XARemindersWindow[source]

Saves the current document of the window.

Returns:

The window object

Return type:

XARemindersWindow

New in version 0.0.6.