Calendar Module Reference

Classes:

XACalendarAlarm(properties)

An event alarm in Calendar.app.

XACalendarApplication(properties)

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

XACalendarAttachment(properties)

A class for interacting with calendar event attachments.

XACalendarAttachmentList(properties[, filter])

A wrapper around lists of event attachments that employs fast enumeration techniques.

XACalendarAttendee(properties)

An event attendee in Calendar.app.

XACalendarAttendeeList(properties[, filter])

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

XACalendarCalendar(properties)

A calendar in Calendar.app.

XACalendarCalendarList(properties[, filter])

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

XACalendarDisplayAlarm(properties)

A display alarm in Calendar.app.

XACalendarDocument(properties)

A document in Calendar.app.

XACalendarDocumentList(properties[, filter])

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

XACalendarEvent(properties)

An event in Calendar.app.

XACalendarEventList(properties[, filter])

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

XACalendarMailAlarm(properties)

A mail alarm in Calendar.app.

XACalendarOpenFileAlarm(properties)

An open file alarm in Calendar.app.

XACalendarSoundAlarm(properties)

A sound alarm in Calendar.app.

XACalendarWindow(properties)

A window of Calendar.app.

class PyXA.apps.Calendar.XACalendarAlarm(properties: dict)[source]

Bases: XAObject

An event alarm in Calendar.app.

New in version 0.0.6.

Attributes:

properties

All properties of the alarm.

trigger_date

The date of the alarm.

trigger_interval

The interval in minutes between the event and the alarm.

property properties: dict

All properties of the alarm.

property trigger_date: datetime

The date of the alarm.

property trigger_interval: int

The interval in minutes between the event and the alarm.

class PyXA.apps.Calendar.XACalendarApplication(properties: dict)[source]

Bases: XASBApplication, XACanOpenPath

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

New in version 0.0.1.

Classes:

EventStatus(value)

Event confirmation statuses.

ObjectType(value)

The object types that can be created using make().

ParticipationStatus(value)

Event participation statuses.

Priority(value)

Event priorities.

ViewType(value)

Views in Calendar.app.

Methods:

calendars([filter])

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

documents([filter])

Returns a list of documents, 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_calendar([name])

Creates a new calendar with the given name.

new_event(summary, start_date, end_date[, ...])

Creates a new event with the given name and start/end dates in the specified calendar.

reload_calendars()

Reloads the contents of all calendars.

subscribe_to(url)

Subscribes to the calendar at the specified URL.

switch_view_to(view)

Switches to the target calendar view.

view_calendar_at(date[, view])

Displays the calendar at the provided date.

Attributes:

default_calendar

The calendar that events are added to by default.

frontmost

Whether Calendar is the frontmost application.

name

The name of the application.

properties

All properties of the application.

version

The version of the Calendar application.

class EventStatus(value)[source]

Bases: Enum

Event confirmation statuses.

Attributes:

CANCELLED

A cancelled event

CONFIRMED

A confirmed event

NONE

An event without a status

TENTATIVE

A tentative event

CANCELLED = 1161061217

A cancelled event

CONFIRMED = 1161061230

A confirmed event

NONE = 1161064047

An event without a status

TENTATIVE = 1161065573

A tentative event

class ObjectType(value)[source]

Bases: Enum

The object types that can be created using make().

Attributes:

CALENDAR

A calendar

DISPLAY_ALARM

A display alarm

DOCUMENT

A document

EVENT

An event

MAIL_ALARM

A mail alarm

OPEN_FILE_ALARM

An open file alarm

SOUND_ALARM

A sound alarm

CALENDAR = 'calendar'

A calendar

DISPLAY_ALARM = 'display_alarm'

A display alarm

DOCUMENT = 'document'

A document

EVENT = 'event'

An event

MAIL_ALARM = 'mail_alarm'

A mail alarm

OPEN_FILE_ALARM = 'open_file_alarm'

An open file alarm

SOUND_ALARM = 'sound_alarm'

A sound alarm

class ParticipationStatus(value)[source]

Bases: Enum

Event participation statuses.

Attributes:

ACCEPTED

Invitation has been accepted

DECLINED

Invitation has been declined

TENTATIVE

Invitation has been tentatively accepted

UNKNOWN

No answer yet

ACCEPTED = 1161191792

Invitation has been accepted

DECLINED = 1161192560

Invitation has been declined

TENTATIVE = 1161196656

Invitation has been tentatively accepted

UNKNOWN = 1161195105

No answer yet

class Priority(value)[source]

Bases: Enum

Event priorities.

Attributes:

HIGH

High priority

LOW

Low priority

MEDIUM

Medium priority

NONE

No priority assigned

HIGH = 1952739377

High priority

LOW = 1952739385

Low priority

MEDIUM = 1952739381

Medium priority

NONE = 1952739376

No priority assigned

class ViewType(value)[source]

Bases: Enum

Views in Calendar.app.

Attributes:

DAY

The iCal day view

MONTH

The iCal month view

WEEK

The iCal week view

YEAR

The iCal year view

DAY = 1161127009

The iCal day view

MONTH = 1161129327

The iCal month view

WEEK = 1161131877

The iCal week view

YEAR = 1161132389

The iCal year view

calendars(filter: dict | None = None) XACalendarCalendarList[source]

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

Parameters:

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

Returns:

The list of calendars

Return type:

XACalendarCalendarList

Example 1:

Get all calendars

>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> print(app.calendars())
<<class 'PyXA.apps.Calendar.XACalendarCalendarList'>['Calendar', 'Calendar2', 'Calendar3', ...]>
Example 2:

Get calendars using a filter

>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> print(app.calendars({"name": "Calendar"})[0])
<<class 'PyXA.apps.Calendar.XACalendarCalendar'>Calendar>
Example 3:

Get calendars using list methods

>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> print(app.calendars().by_name("Calendar"))
<<class 'PyXA.apps.Calendar.XACalendarCalendar'>Calendar>

New in version 0.0.6.

property default_calendar: XACalendarCalendar

The calendar that events are added to by default.

documents(filter: dict | None = None) XACalendarDocumentList[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 Calendar is the frontmost application.

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, XACalendarApplication.ObjectType]) – The classname of the object to create

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

  • data (Any) – The data to give the object

Returns:

A PyXA wrapped form of the object

Return type:

XABase.XAObject

Example 1:

Make a new calendar

>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> new_calendar = app.make("calendar", {"name": "PyXA Development"})
>>> app.calendars().push(new_calendar)
Example 2:

Make a new event

>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> start_date = datetime.now()
>>> end_date = start_date + timedelta(hours = 1)
>>> new_event = app.make("event", {"summary": "Work on PyXA", "startDate": start_date, "endDate": end_date})
>>> app.default_calendar.events().push(new_event)

New in version 0.0.6.

property name: str

The name of the application.

new_calendar(name: str = 'New Calendar') XACalendarCalendar[source]

Creates a new calendar with the given name.

Parameters:

name (str, optional) – The name of the calendar, defaults to “New Calendar”

Returns:

The newly created calendar object

Return type:

XACalendarCalendar

Example:

>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> app.new_calendar("PyXA Development")

New in version 0.0.1.

new_event(summary: str, start_date: datetime, end_date: datetime, calendar: XACalendarCalendar | None = None) XACalendarEvent[source]

Creates a new event with the given name and start/end dates in the specified calendar. If no calendar is specified, the default calendar is used.

Parameters:
  • name (str) – The name of the event

  • start_date (datetime) – The start date and time of the event.

  • end_date (datetime) – The end date and time of the event.

Returns:

A reference to the newly created event.

Return type:

XACalendarEvent

Example:

Create event on the default calendar

>>> from datetime import datetime, timedelta
>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> start_date = datetime.now()
>>> end_date = start_date + timedelta(hours = 1)
>>> app.new_event("Learn about PyXA", start_date, end_date)
Example:

Create event on a specific calendar

>>> from datetime import datetime, timedelta
>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> start_date = datetime.now()
>>> end_date = start_date + timedelta(hours = 1)
>>> calendar = app.calendars()[-1]
>>> app.new_event("Learn about PyXA", start_date, end_date, calendar)

New in version 0.0.1.

property properties: dict

All properties of the application.

reload_calendars() XACalendarApplication[source]

Reloads the contents of all calendars.

Returns:

The application object

Return type:

XACalendarApplication

New in version 0.0.1.

subscribe_to(url: str) XACalendarCalendar[source]

Subscribes to the calendar at the specified URL.

Parameters:

url (str) – The URL of the calendar (in iCal format) to subscribe to

Returns:

The newly created calendar object

Return type:

XACalendarCalendar

New in version 0.0.1.

switch_view_to(view: ViewType) XACalendarApplication[source]

Switches to the target calendar view.

Parameters:

view (XACalendarApplication.ViewType) – The view to switch to.

Returns:

The application object

Return type:

XACalendarApplication

Example:

>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> app.switch_view_to(app.ViewType.WEEK)
>>> app.switch_view_to(app.ViewType.DAY)
>>> app.switch_view_to(app.ViewType.MONTH)
>>> app.switch_view_to(app.ViewType.YEAR)

New in version 0.0.1.

property version: str

The version of the Calendar application.

view_calendar_at(date: datetime, view: None | ViewType = None) XACalendarApplication[source]

Displays the calendar at the provided date.

Parameters:

date (datetime) – The date to display.

Returns:

A reference to the Calendar application object.

Return type:

XACalendarApplication

Example:

>>> import PyXA
>>> from datetime import date
>>> app = PyXA.Application("Calendar")
>>> date1 = date(2022, 7, 20)
>>> app.view_calendar_at(date1)

New in version 0.0.1.

class PyXA.apps.Calendar.XACalendarAttachment(properties: dict)[source]

Bases: XAObject

A class for interacting with calendar event attachments.

New in version 0.0.2.

Attributes:

file

The location of the attachment on the local disk.

file_name

The filename of the original document.

type

The content type of the attachment, e.g. image/png.

url

The iCloud URL of the attachment.

uuid

A unique identifier for the attachment.

Methods:

open()

Opens the attachment in its default application.

property file: XAPath

The location of the attachment on the local disk.

property file_name: str

The filename of the original document.

open() XACalendarAttachment[source]

Opens the attachment in its default application.

Returns:

A reference to the attachment object.

Return type:

XACalendarAttachment

Example:

>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> calendar = app.default_calendar
>>> event = calendar.events_today()[0]
>>> event.attachments()[0].open()

New in version 0.0.2.

property type: str

The content type of the attachment, e.g. image/png.

property url: XAURL

The iCloud URL of the attachment.

property uuid: str

A unique identifier for the attachment.

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

Bases: XAList

A wrapper around lists of event attachments that employs fast enumeration techniques.

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

New in version 0.0.6.

Methods:

by_file(file)

by_file_name(file_name)

by_type(type)

by_url(url)

by_uuid(uuid)

file()

file_name()

type()

url()

uuid()

by_file(file: XAPath | str) XACalendarAttachment | None[source]
by_file_name(file_name: str) XACalendarAttachment | None[source]
by_type(type: str) XACalendarAttachment | None[source]
by_url(url: XAURL | str) XACalendarAttachment | None[source]
by_uuid(uuid: str) XACalendarAttachment | None[source]
file() list[XAPath][source]
file_name() list[str][source]
type() list[str][source]
url() list[XAURL][source]
uuid() list[str][source]
class PyXA.apps.Calendar.XACalendarAttendee(properties: dict)[source]

Bases: XAObject

An event attendee in Calendar.app.

New in version 0.0.1.

Attributes:

display_name

The first and last name of the attendee.

email

The email address of the attendee.

participation_status

The invitation status for the attendee.

properties

All properties of the attendee.

property display_name: str

The first and last name of the attendee.

property email: str

The email address of the attendee.

property participation_status: ParticipationStatus

The invitation status for the attendee.

property properties: dict

All properties of the attendee.

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

Bases: XAList

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

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

New in version 0.0.6.

Methods:

by_display_name(display_name)

by_email(email)

by_participation_status(participation_status)

by_properties(properties)

display_name()

email()

participation_status()

properties()

by_display_name(display_name: str) XACalendarAttendee | None[source]
by_email(email: str) XACalendarAttendee | None[source]
by_participation_status(participation_status: ParticipationStatus) XACalendarAttendee | None[source]
by_properties(properties: dict) XACalendarAttendee | None[source]
display_name() list[str][source]
email() list[str][source]
participation_status() list[ParticipationStatus][source]
properties() list[dict][source]
class PyXA.apps.Calendar.XACalendarCalendar(properties: dict)[source]

Bases: XAObject

A calendar in Calendar.app.

New in version 0.0.1.

Attributes:

calendar_obj

color

The color of the calendar.

description

The description of the calendar.

name

The name of the calendar.

properties

All properties of the calendar.

writable

Whether the calendar is writable.

Methods:

delete()

Deletes the calendar.

events([filter])

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

events_in_range(start_date, end_date)

Gets a list of events occurring between the specified start and end datetimes.

events_today()

Gets a list of all events in the next 24 hours.

new_event(name, start_date, end_date)

Creates a new event and pushes it onto this calendar's events array.

property calendar_obj: EKCalendar
property color: XAColor

The color of the calendar.

delete() XACalendarEvent[source]

Deletes the calendar.

New in version 0.0.2.

property description: str

The description of the calendar.

events(filter: dict | None = None) XACalendarEventList[source]

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

Parameters:

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

Returns:

The list of events

Return type:

XACalendarEventList

New in version 0.0.6.

events_in_range(start_date: datetime, end_date: datetime) XACalendarEventList[source]

Gets a list of events occurring between the specified start and end datetimes.

Parameters:
  • start_date (datetime) – The earliest date an event in the list should begin.

  • end_date (datetime) – The latest date an event in the list should end.

Returns:

The list of events.

Return type:

XACalendarEventList

Example:

>>> from datetime import date
>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> calendar = app.default_calendar
>>> start_date = date(2022, 6, 4)
>>> end_date = date(2022, 6, 6)
>>> print(calendar.events_in_range(start_date, end_date))
[<PyXA.apps.Calendar.XACalendarEvent object at 0x105b83d90>, <PyXA.apps.Calendar.XACalendarEvent object at 0x105b90bb0>, <PyXA.apps.Calendar.XACalendarEvent object at 0x105b90dc0>]

Note

Querying events from a wide date range can take significant time. If you are looking for a specific subset of events within a large date range, it might be faster to use events() with a well-constructed filter and then iterate through the resulting array of objects, parsing out events outside of the desired date range.

New in version 0.0.2.

events_today() XACalendarEventList[source]

Gets a list of all events in the next 24 hours.

Returns:

The list of events.

Return type:

XACalendarEventList

See also

week_events()

New in version 0.0.2.

property name: str

The name of the calendar.

new_event(name: str, start_date: datetime, end_date: datetime) XACalendarEvent[source]

Creates a new event and pushes it onto this calendar’s events array.

Parameters:
  • name (str) – The name of the event.

  • start_date (datetime) – The start date and time of the event.

  • end_date (datetime) – The end date and time of the event.

Returns:

A reference to the newly created event.

Return type:

XACalendarEvent

New in version 0.0.1.

property properties: dict

All properties of the calendar.

property writable: bool

Whether the calendar is writable.

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

Bases: XAList

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

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

New in version 0.0.6.

Methods:

by_color(color)

by_description(description)

by_name(name)

by_properties(properties)

by_writable(writable)

color()

description()

events()

name()

properties()

writable()

by_color(color: XAColor) XACalendarCalendar | None[source]
by_description(description: str) XACalendarCalendar | None[source]
by_name(name: str) XACalendarCalendar | None[source]
by_properties(properties: dict) XACalendarCalendar | None[source]
by_writable(writable: bool) XACalendarCalendar | None[source]
color() list[XAColor][source]
description() list[str][source]
events() XACalendarEventList[source]
name() list[str][source]
properties() list[dict][source]
writable() list[bool][source]
class PyXA.apps.Calendar.XACalendarDisplayAlarm(properties: dict)[source]

Bases: XACalendarAlarm

A display alarm in Calendar.app.

New in version 0.0.6.

class PyXA.apps.Calendar.XACalendarDocument(properties: dict)[source]

Bases: XAObject

A document in Calendar.app.

New in version 0.0.6.

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.

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.

property name: str

The name of the document.

property properties: dict

All properties of the document.

class PyXA.apps.Calendar.XACalendarDocumentList(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) XACalendarDocument | None[source]
by_modified(modified: bool) XACalendarDocument | None[source]
by_name(name: str) XACalendarDocument | None[source]
by_properties(properties: dict) XACalendarDocument | None[source]
file() list[XAPath][source]
modified() list[bool][source]
name() list[str][source]
properties() list[dict][source]
class PyXA.apps.Calendar.XACalendarEvent(properties: dict)[source]

Bases: XAObject

An event in Calendar.app.

New in version 0.0.1.

Methods:

add_attachment(path)

Adds the file at the specified path as an attachment to the event.

attachments([filter])

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

attendees([filter])

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

delete()

Deletes the event.

duplicate()

Duplicates the event, placing the copy on the same calendar.

duplicate_to(calendar)

Duplicates the event, placing the copy on the same calendar.

move_to(calendar)

Moves this event to the specified calendar.

show()

Shows the event in the front calendar window.

Attributes:

allday_event

Whether the event is an all-day event.

description

The event's notes.

end_date

The end date and time of the event.

excluded_dates

The exception dates for the event.

location

The location of the event.

properties

All properties of the event.

recurrence

A string describing the event recurrence.

sequence

The event version.

stamp_date

The date the event was last modified.

start_date

The start date and time of the event.

status

The status of the event.

summary

The summary (title) of the event.

uid

A unique identifier for the event.

url

The URL associated with the event.

xa_event_obj

add_attachment(path: str) XACalendarEvent[source]

Adds the file at the specified path as an attachment to the event.

Parameters:

path (str) – The path of the file to attach to the event.

Returns:

A reference to this event object.

Return type:

XACalendarEvent

Example:

>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> calendar = app.default_calendar
>>> calendar2 = app.calendars()[1]
>>> event = calendar.events_today()[0]
>>> event.add_attachment("/Users/exampleuser/Image.png")

New in version 0.0.2.

property allday_event: bool

Whether the event is an all-day event.

attachments(filter: dict | None = None) XACalendarAttachmentList[source]

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

Returns:

The list of attachments.

Return type:

XACalendarAttachmentList

New in version 0.0.2.

attendees(filter: dict | None = None) XACalendarAttendeeList[source]

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

Parameters:

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

Returns:

The list of attendees

Return type:

XACalendarAttendeeList

New in version 0.0.6.

delete()[source]

Deletes the event.

New in version 0.0.1.

property description: str

The event’s notes.

duplicate() XACalendarEvent[source]

Duplicates the event, placing the copy on the same calendar.

:return:The newly created event object. :rtype: XACalendarEvent

New in version 0.0.1.

duplicate_to(calendar: XACalendarCalendar) XACalendarEvent[source]

Duplicates the event, placing the copy on the same calendar.

Returns:

The event object that this method was called from

Return type:

XACalendarEvent

Example:

Copy today’s event to another calendar

>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> calendar = app.default_calendar
>>> calendar2 = app.calendars()[2]
>>> event = calendar.events_today()[0]
>>> event.duplicate_to(calendar2)

New in version 0.0.1.

property end_date: datetime

The end date and time of the event.

property excluded_dates: list[datetime]

The exception dates for the event.

property location: str

The location of the event.

move_to(calendar: XACalendarCalendar) XACalendarEvent[source]

Moves this event to the specified calendar.

Parameters:

calendar (XACalendar) – The calendar to move the event to.

Returns:

A reference to the moved event object.

Return type:

XACalendarEvent

Example:

Move today’s event to another calendar

>>> import PyXA
>>> app = PyXA.Application("Calendar")
>>> calendar = app.default_calendar
>>> calendar2 = app.calendars()[2]
>>> event = calendar.events_today()[0]
>>> event.move_to(calendar2)

See also

duplicate_to()

New in version 0.0.2.

property properties: dict

All properties of the event.

property recurrence: str

A string describing the event recurrence.

property sequence: int

The event version.

show() XACalendarEvent[source]

Shows the event in the front calendar window.

Returns:

The event object.

Return type:

XACalendarEvent

New in version 0.0.1.

property stamp_date: datetime

The date the event was last modified.

property start_date: datetime

The start date and time of the event.

property status: EventStatus

The status of the event.

property summary: str

The summary (title) of the event.

property uid: str

A unique identifier for the event.

property url: str

The URL associated with the event.

property xa_event_obj: type
class PyXA.apps.Calendar.XACalendarEventList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

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

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

New in version 0.0.6.

Methods:

allday_event()

by_allday_event(allday_event)

by_description(description)

by_end_date(end_date)

by_excluded_dates(excluded_dates)

by_location(location)

by_properties(properties)

by_recurrence(recurrence)

by_sequence(sequence)

by_stamp_date(stamp_date)

by_start_date(start_date)

by_status(status)

by_summary(summary)

by_uid(uid)

by_url(url)

description()

end_date()

excluded_dates()

location()

properties()

Gets the properties of every event in the list.

recurrence()

sequence()

stamp_date()

start_date()

status()

summary()

uid()

url()

allday_event() list[bool][source]
by_allday_event(allday_event: bool) XACalendarEvent | None[source]
by_description(description: str) XACalendarEvent | None[source]
by_end_date(end_date: datetime) XACalendarEvent | None[source]
by_excluded_dates(excluded_dates: list[datetime]) XACalendarEvent | None[source]
by_location(location: str) XACalendarEvent | None[source]
by_properties(properties: dict) XACalendarEvent | None[source]
by_recurrence(recurrence: str) XACalendarEvent | None[source]
by_sequence(sequence: int) XACalendarEvent | None[source]
by_stamp_date(stamp_date: datetime) XACalendarEvent | None[source]
by_start_date(start_date: datetime) XACalendarEvent | None[source]
by_status(status: EventStatus) XACalendarEvent | None[source]
by_summary(summary: str) XACalendarEvent | None[source]
by_uid(uid: str) XACalendarEvent | None[source]
by_url(url: str | XAURL) XACalendarEvent | None[source]
description() list[str][source]
end_date() list[datetime][source]
excluded_dates() list[list[datetime]][source]
location() list[str][source]
properties() Generator[dict[str, Any], None, None][source]

Gets the properties of every event in the list.

Returns:

A generator that generates a dictionary of element properties.

Return type:

Generator[dict[str, Any], None, None]

recurrence() list[str][source]
sequence() list[int][source]
stamp_date() list[datetime][source]
start_date() list[datetime][source]
status() list[EventStatus][source]
summary() list[str][source]
uid() list[str][source]
url() list[XAURL][source]
class PyXA.apps.Calendar.XACalendarMailAlarm(properties: dict)[source]

Bases: XACalendarAlarm

A mail alarm in Calendar.app.

New in version 0.0.6.

class PyXA.apps.Calendar.XACalendarOpenFileAlarm(properties: dict)[source]

Bases: XACalendarAlarm

An open file alarm in Calendar.app.

New in version 0.0.6.

Attributes:

file_path

The path to be opened by the alarm.

property file_path: str

The path to be opened by the alarm.

class PyXA.apps.Calendar.XACalendarSoundAlarm(properties: dict)[source]

Bases: XACalendarAlarm

A sound alarm in Calendar.app.

New in version 0.0.6.

Attributes:

sound_file

The path to the sound file to be used for the alarm

sound_name

The system sound name to be used for the alarm

property sound_file: str

The path to the sound file to be used for the alarm

property sound_name: str

The system sound name to be used for the alarm

class PyXA.apps.Calendar.XACalendarWindow(properties: dict)[source]

Bases: XASBWindow

A window of Calendar.app.

New in version 0.0.1.

Attributes:

document

The current document displayed in the window.

properties

All properties of the window.

property document: XACalendarDocument

The current document displayed in the window.

property properties: dict

All properties of the window.