Event

class gcsa.event.Event(summary, start, end=None, *, timezone=None, event_id=None, description=None, location=None, recurrence=None, color_id=None, visibility=Visibility.DEFAULT, attendees=None, attachments=None, conference_solution=None, reminders=None, default_reminders=False, minutes_before_popup_reminder=None, minutes_before_email_reminder=None, guests_can_invite_others=True, guests_can_modify=False, guests_can_see_other_guests=True, transparency=None, _creator=None, _organizer=None, _created=None, _updated=None, _recurring_event_id=None, **other)
Parameters:
  • summary (str | None) – Title of the event.

  • start (date | datetime | BeautifulDate) – Starting date/datetime.

  • end (date | datetime | BeautifulDate | None) – Ending date/datetime. If ‘end’ is not specified, event is considered as a 1-day or 1-hour event if ‘start’ is date or datetime respectively.

  • timezone (str | None) – Timezone formatted as an IANA Time Zone Database name, e.g. “Europe/Zurich”. If it is not provided and ‘start’ doesn’t have tzinfo, the computers local timezone is used if it is configured. UTC is used otherwise.

  • event_id (str | None) – Opaque identifier of the event. By default, it is generated by the server. You can specify id as a 5-1024 long string of characters used in base32hex ([a-vA-V0-9]). The ID must be unique per calendar.

  • description (str | None) – Description of the event. Can contain HTML.

  • location (str | None) – Geographic location of the event as free-form text.

  • recurrence (str | List[str] | None) – RRULE/RDATE/EXRULE/EXDATE string or list of such strings. See recurrence

  • color_id (str | None) – Color id referring to an entry from colors endpoint. See list_event_colors()

  • visibility (str) – Visibility of the event. Default is default visibility for events on the calendar. See Visibility

  • attendees (Attendee | str | List[Attendee] | List[str] | None) – Attendee or list of attendees. See Attendee. Each attendee may be given as email string or Attendee object.

  • attachments (Attachment | List[Attachment] | None) – Attachment or list of attachments. See Attachment

  • conference_solution (ConferenceSolution | ConferenceSolutionCreateRequest | None) – ConferenceSolutionCreateRequest object to create a new conference or ConferenceSolution object for an existing conference.

  • reminders (Reminder | List[Reminder] | None) – Reminder or list of reminder objects. See reminders

  • default_reminders (bool) – Whether the default reminders of the calendar apply to the event.

  • minutes_before_popup_reminder (int | None) – Minutes before popup reminder or None if reminder is not needed.

  • minutes_before_email_reminder (int | None) – Minutes before an email reminder or None if a reminder is not needed.

  • guests_can_invite_others (bool) – Whether attendees other than the organizer can invite others to the event.

  • guests_can_modify (bool) – Whether attendees other than the organizer can modify the event.

  • guests_can_see_other_guests (bool) – Whether attendees other than the organizer can see who the event’s attendees are.

  • transparency (str | None) – Whether the event blocks time on the calendar. See Transparency

  • _creator (Person | None) – The creator of the event. See Person

  • _organizer (Person | None) – The organizer of the event. See Person. If the organizer is also an attendee, this is indicated with a separate entry in attendees with the organizer field set to True. To change the organizer, use the move operation see move_event()

  • _created (datetime | None) – Creation time of the event. Read-only.

  • _updated (datetime | None) – Last modification time of the event. Read-only.

  • _recurring_event_id (str | None) – For an instance of a recurring event, this is the id of the recurring event to which this instance belongs. Read-only.

  • other – Other fields that should be included in request JSON. They will be included as they are. See more at https://developers.google.com/calendar/v3/reference/events

property id
add_attendee(attendee)

Adds attendee to an event. See Attendee. Attendee may be given as email string or Attendee object.

Parameters:

attendee (str | Attendee)

add_attendees(attendees)

Adds multiple attendees to an event. See Attendee. Each attendee may be given as email string or Attendee object.

Parameters:

attendees (List[str | Attendee])

add_attachment(file_url, title=None, mime_type=None)

Adds attachment to an event. See Attachment

Parameters:
  • file_url (str)

  • title (str | None)

  • mime_type (str | None)

add_email_reminder(minutes_before_start=None, days_before=None, at=None)

Adds an email reminder to an event. See EmailReminder

Parameters:
  • minutes_before_start (int | None)

  • days_before (int | None)

  • at (time | None)

add_popup_reminder(minutes_before_start=None, days_before=None, at=None)

Adds a popup reminder to an event. See PopupReminder

Parameters:
  • minutes_before_start (int | None)

  • days_before (int | None)

  • at (time | None)

add_reminder(reminder)

Adds a reminder to an event. See reminders

Parameters:

reminder (Reminder)

property is_recurring_instance
class gcsa.event.Visibility

Possible values of the event visibility.

  • DEFAULT - Uses the default visibility for events on the calendar. This is the default value.

  • PUBLIC - The event is public and event details are visible to all readers of the calendar.

  • PRIVATE - The event is private and only event attendees may view event details.

DEFAULT = 'default'
PUBLIC = 'public'
PRIVATE = 'private'
class gcsa.event.Transparency

Possible values of the event transparency.

  • OPAQUE - Default value. The event does block time on the calendar. This is equivalent to setting ‘Show me as’ to ‘Busy’ in the Calendar UI.

  • TRANSPARENT - The event does not block time on the calendar. This is equivalent to setting ‘Show me as’ to ‘Available’ in the Calendar UI.

OPAQUE = 'opaque'
TRANSPARENT = 'transparent'