🔍 Code Extractor

class Attendee

Maturity: 49

Represents an event attendee in Microsoft Exchange/Office 365, which can be a person or a resource (meeting room, equipment) configured on the Exchange server.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/outlook/calendar/attendees/attendee.py
Lines:
5 - 25
Complexity:
simple

Purpose

This class models an attendee for calendar events in Office 365/Exchange environments. It extends AttendeeBase to include additional properties specific to event attendance such as response status and proposed new meeting times. Used when creating, updating, or querying calendar events to represent participants and their responses.

Source Code

class Attendee(AttendeeBase):
    """An event attendees. This can be a person or resource such as a meeting room or equipment,
    that has been set up as a resource on the Exchange server for the tenant."""

    def __init__(
        self,
        email_address=EmailAddress(),
        attendee_type=None,
        proposed_new_time=None,
        status=None,
    ):
        """

        :param office365.mail.emailAddress.EmailAddress emailAddress email_address:
        :param office365.calendar.timeSlot.TimeSlot proposed_new_time:
        :param str status: The attendees's response (none, accepted, declined, etc.) for the event and date-time
            that the response was sent.
        """
        super(Attendee, self).__init__(email_address, attendee_type)
        self.proposedNewTime = proposed_new_time
        self.status = status

Parameters

Name Type Default Kind
bases AttendeeBase -

Parameter Details

email_address: An EmailAddress object containing the attendee's email information. Defaults to an empty EmailAddress() instance. This identifies the attendee or resource.

attendee_type: Optional string specifying the type of attendee (e.g., 'required', 'optional', 'resource'). Inherited from AttendeeBase. Defaults to None.

proposed_new_time: Optional TimeSlot object representing an alternative time proposed by the attendee for the meeting. Defaults to None. Used when attendees suggest rescheduling.

status: Optional string indicating the attendee's response status for the event (e.g., 'none', 'accepted', 'declined', 'tentative') and when the response was sent. Defaults to None.

Return Value

Instantiation returns an Attendee object with the specified email address, attendee type, proposed new time, and response status. The object maintains state about an event participant and their response.

Class Interface

Methods

__init__(email_address=EmailAddress(), attendee_type=None, proposed_new_time=None, status=None)

Purpose: Initializes an Attendee instance with email address, type, proposed time, and response status

Parameters:

  • email_address: EmailAddress object identifying the attendee (defaults to empty EmailAddress())
  • attendee_type: String specifying attendee type ('required', 'optional', 'resource'), defaults to None
  • proposed_new_time: TimeSlot object for alternative meeting time proposed by attendee, defaults to None
  • status: String indicating response status ('none', 'accepted', 'declined', 'tentative'), defaults to None

Returns: None (constructor)

Attributes

Name Type Description Scope
proposedNewTime office365.calendar.timeSlot.TimeSlot Stores an alternative time slot proposed by the attendee for rescheduling the event instance
status str Stores the attendee's response status for the event (none, accepted, declined, tentative) and response timestamp instance
email_address office365.mail.emailAddress.EmailAddress Inherited from AttendeeBase - stores the email address information of the attendee instance
attendee_type str Inherited from AttendeeBase - stores the type classification of the attendee (required, optional, resource) instance

Dependencies

  • office365

Required Imports

from office365.outlook.calendar.attendees.attendee import Attendee
from office365.outlook.calendar.email_address import EmailAddress
from office365.outlook.calendar.timeSlot import TimeSlot

Usage Example

from office365.outlook.calendar.attendees.attendee import Attendee
from office365.outlook.calendar.email_address import EmailAddress

# Create an attendee with email address
email = EmailAddress()
email.address = 'john.doe@example.com'
email.name = 'John Doe'

attendee = Attendee(
    email_address=email,
    attendee_type='required',
    status='accepted'
)

# Access attendee properties
print(attendee.status)  # 'accepted'
print(attendee.proposedNewTime)  # None

# Create optional attendee
optional_email = EmailAddress()
optional_email.address = 'jane.smith@example.com'
optional_attendee = Attendee(
    email_address=optional_email,
    attendee_type='optional',
    status='tentative'
)

Best Practices

  • Always provide a valid EmailAddress object when creating an Attendee instance to properly identify the participant
  • Use appropriate attendee_type values ('required', 'optional', 'resource') to correctly categorize participants
  • The status field should reflect standard calendar response values: 'none', 'accepted', 'declined', 'tentative'
  • When an attendee proposes a new time, populate the proposedNewTime field with a valid TimeSlot object
  • This class inherits from AttendeeBase, so ensure parent class properties are also properly initialized
  • Attendee objects are typically used as part of a larger Event or Meeting object in Office 365 calendar operations
  • The class is immutable after creation unless properties are explicitly modified; consider creating new instances for different states

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class AttendeeBase 82.5% similar

    AttendeeBase is a class representing an attendee in a meeting or calendar event, extending the Recipient class with attendee-specific type information.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/outlook/calendar/attendees/base.py
  • class AttendeeAvailability 72.5% similar

    A data class representing the availability status of an attendee for a calendar event in Microsoft Outlook.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/outlook/calendar/attendees/availability.py
  • class Event 71.7% similar

    Represents a calendar event in Microsoft 365, providing methods to manage event responses (accept, decline, cancel), reminders, and access to event properties like attendees, attachments, and scheduling details.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/outlook/calendar/events/event.py
  • class MeetingParticipants 64.2% similar

    A data class representing participants in a meeting, including an organizer and a collection of attendees.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/communications/onlinemeetings/participants.py
  • class EventCollection 61.9% similar

    A collection class for managing Microsoft Outlook calendar events, providing methods to create and manage events with attendees, time zones, and other properties.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/outlook/calendar/events/collection.py
← Back to Browse