Reminders Module Reference
New in version 0.0.1.
Control the macOS Reminders application using JXA-like syntax.
Classes:
|
An account in the Reminders application. |
|
A wrapper around lists of accounts that employs fast enumeration techniques. |
|
An alarm attached to a reminder. |
|
A wrapper around lists of reminder alarms that employs fast enumeration techniques. |
|
A class for managing and interacting with scripting elements of the Reminders application. |
|
A document in the Reminders application. |
|
A wrapper around lists of documents that employs fast enumeration techniques. |
|
A class for... |
|
A wrapper around lists of reminder lists that employs fast enumeration techniques. |
|
A class for interacting with Reminders. |
|
A reminder in Reminders.app. |
|
A wrapper around lists of reminders that employs fast enumeration techniques. |
|
A window of the Reminders application. |
- class PyXA.apps.Reminders.XARemindersAccount(properties)[source]
Bases:
XAObject
An account in the Reminders application.
Attributes:
The unique identifier of the account.
The name of the account.
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:
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
()- by_id(id: str) XARemindersAccount | None [source]
- by_name(name: str) XARemindersAccount | None [source]
- by_properties(properties: dict) XARemindersAccount | None [source]
- class PyXA.apps.Reminders.XARemindersAlarm(properties)[source]
Bases:
XAObject
An alarm attached to a reminder.
See also
New in version 0.0.2.
Attributes:
The date and time of a date-based alarm.
A unique identifier for this alarm.
Whether a location-based alarm is for arriving or departing.
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
()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]
- location() list[XALocation] [source]
- class PyXA.apps.Reminders.XARemindersApplication(properties)[source]
Bases:
XASBApplication
A class for managing and interacting with scripting elements of the Reminders application.
See also
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:
The default account in the Reminders application.
The default list in the Reminders application.
Whether Reminders is the active application.
The name of the application.
The version number of Reminders.app.
- class ObjectType(value)[source]
Bases:
Enum
The types of objects that can be created using
make()
.Attributes:
- 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:
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:
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:
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:
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:
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.
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:
The location of the document on disk, if it has one.
Whether the document has been modified since it was last saved.
The name of the document.
All properties of the document.
- 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.
- property properties: dict
All properties of the 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
()- 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]
- class PyXA.apps.Reminders.XARemindersList(properties)[source]
Bases:
XAObject
A class for…
Attributes:
The color of the list.
The container of the list.
The emblem icon name of the list.
The unique identifier of the list.
The name of the list.
All properties of the list.
A list of individuals with whom the list is shared with
Whether the list is shared
The URL of the list used to subscribe to it
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.
- 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:
New in version 0.0.6.
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:
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
()delete
()Deletes all reminder lists in the list.
emblem
()id
()name
()- 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]
- container() XARemindersAccountList [source]
- reminders() XARemindersReminderList [source]
- class PyXA.apps.Reminders.XARemindersRecurrenceRule(properties)[source]
Bases:
XAObject
A class for interacting with Reminders.
See also
New in version 0.0.2.
Attributes:
The end date and time of recurrence.
Specifier for the base unit of recurrence, i.e. daily, weekly, monthly, or yearly.
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.
- 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:
Whether the reminder is all day or a specific time.
The all-day due date of the reminder; will only set a date.
The notes attached to the reminder.
Whether the reminder is completed.
The completion date of the reminder.
The container of the reminder.
The creation date of the reminder.
The due date of the reminder; will set both date and time.
Whether the reminder is flagged.
The unique identifier of the reminder.
The modification date of the reminder.
The name of the reminder.
User-inputted notes for this reminder.
The priority of the reminder; 0: no priority, 1–4: high, 5: medium, 6–9: low.
All properties of the reminder.
The recurrence rule for the reminder.
The remind date of the reminder.
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:
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.
- 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:
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:
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
()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)delete
()Deletes all reminders in the list.
due_date
()flagged
()id
()move_to
(list)Moves all reminders in the list to the specified reminder list.
name
()priority
()- alarms() list[XARemindersAlarmList] [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]
- container() XARemindersListList [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.
- 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:
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:
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:
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:
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:
New in version 0.0.6.
- save() XARemindersWindow [source]
Saves the current document of the window.
- Returns:
The window object
- Return type:
New in version 0.0.6.