Simple API for Google Calendar management
—
GCSA provides comprehensive video conferencing integration through the ConferenceSolution, ConferenceSolutionCreateRequest, and EntryPoint classes. These classes support Google Meet, Hangouts, and third-party conference solutions with flexible configuration options.
from gcsa.conference import (
ConferenceSolution,
ConferenceSolutionCreateRequest,
EntryPoint,
SolutionType
)
from gcsa.event import Eventclass ConferenceSolution:
def __init__(
self,
entry_points = None,
solution_type = None,
name = None,
icon_uri = None,
conference_id = None,
signature = None,
notes = None
):
"""
Create a conference solution for existing conferences.
:param entry_points: List of EntryPoint objects for joining the conference
:param solution_type: Type of conference solution (SolutionType constants)
:param name: Display name for the conference solution
:param icon_uri: URI for the conference solution icon
:param conference_id: Unique identifier for the conference
:param signature: Conference signature for validation
:param notes: Additional notes about the conference
"""class ConferenceSolutionCreateRequest:
def __init__(
self,
solution_type: str,
request_id = None,
_status = None,
conference_id = None,
signature = None,
notes = None
):
"""
Create a request to generate a new conference solution.
:param solution_type: Type of conference to create (SolutionType constants)
:param request_id: Unique identifier for the creation request
:param _status: Status of the creation request (read-only)
:param conference_id: Generated conference ID (read-only after creation)
:param signature: Conference signature (read-only after creation)
:param notes: Additional notes about the conference
"""class EntryPoint:
def __init__(
self,
entry_point_type: str,
uri = None,
label = None,
pin = None,
access_code = None,
meeting_code = None,
passcode = None,
password = None
):
"""
Create a conference entry point (video, phone, SIP, etc.).
:param entry_point_type: Type of entry point (VIDEO, PHONE, SIP, MORE)
:param uri: URI for joining (video URL, phone number, SIP address)
:param label: Display label for the entry point
:param pin: PIN code for access
:param access_code: Access code for joining
:param meeting_code: Meeting code for joining
:param passcode: Passcode for authentication
:param password: Password for authentication
"""class EntryPoint:
VIDEO = "video" # Video conference link
PHONE = "phone" # Phone dial-in number
SIP = "sip" # SIP address
MORE = "more" # Additional entry method
ENTRY_POINT_TYPES = [VIDEO, PHONE, SIP, MORE]class SolutionType:
HANGOUT = "hangout" # Google Hangouts (legacy)
NAMED_HANGOUT = "namedHangout" # Named Google Hangout
HANGOUTS_MEET = "hangoutsMeet" # Google Meet
ADD_ON = "addOn" # Third-party add-on solutionfrom gcsa.google_calendar import GoogleCalendar
from gcsa.event import Event
from gcsa.conference import ConferenceSolutionCreateRequest, SolutionType
from datetime import datetime
gc = GoogleCalendar()
# Event with Google Meet auto-generation
meeting = Event(
summary="Team Video Call",
start=datetime(2024, 2, 15, 14, 0),
end=datetime(2024, 2, 15, 15, 0),
description="Weekly team sync via video",
conference_solution=ConferenceSolutionCreateRequest(
solution_type=SolutionType.HANGOUTS_MEET
)
)
created_event = gc.add_event(meeting)
# Google Meet link will be automatically generated and available in the event
print(f"Google Meet link: {created_event.hangout_link}")from gcsa.event import Event
from gcsa.conference import ConferenceSolution, EntryPoint, SolutionType
from datetime import datetime
# Custom conference with multiple entry points
zoom_meeting = Event(
summary="Client Presentation",
start=datetime(2024, 3, 1, 10, 0),
end=datetime(2024, 3, 1, 11, 30),
location="Online - Zoom",
conference_solution=ConferenceSolution(
solution_type=SolutionType.ADD_ON,
name="Zoom Meeting",
conference_id="123-456-789",
entry_points=[
EntryPoint(
entry_point_type=EntryPoint.VIDEO,
uri="https://zoom.us/j/123456789",
label="Join via Zoom App",
meeting_code="123456789",
passcode="secret123"
),
EntryPoint(
entry_point_type=EntryPoint.PHONE,
uri="tel:+1-234-567-8900",
label="Dial-in Number",
access_code="123456789#"
)
]
)
)
gc.add_event(zoom_meeting)from gcsa.event import Event
from gcsa.conference import ConferenceSolution, EntryPoint, SolutionType
from datetime import datetime
teams_meeting = Event(
summary="All Hands Meeting",
start=datetime(2024, 3, 15, 9, 0),
end=datetime(2024, 3, 15, 10, 0),
conference_solution=ConferenceSolution(
solution_type=SolutionType.ADD_ON,
name="Microsoft Teams",
conference_id="teams-meeting-id-12345",
entry_points=[
EntryPoint(
entry_point_type=EntryPoint.VIDEO,
uri="https://teams.microsoft.com/l/meetup-join/...",
label="Join Microsoft Teams Meeting"
),
EntryPoint(
entry_point_type=EntryPoint.PHONE,
uri="tel:+1-555-0123",
label="Conference Phone",
access_code="123456789"
)
],
notes="Meeting ID: 123 456 789"
)
)
gc.add_event(teams_meeting)from gcsa.event import Event
from gcsa.conference import ConferenceSolution, EntryPoint, SolutionType
from datetime import datetime
webex_session = Event(
summary="Training Session - WebEx",
start=datetime(2024, 4, 10, 13, 0),
end=datetime(2024, 4, 10, 16, 0),
conference_solution=ConferenceSolution(
solution_type=SolutionType.ADD_ON,
name="Cisco WebEx",
conference_id="webex-session-987654321",
entry_points=[
EntryPoint(
entry_point_type=EntryPoint.VIDEO,
uri="https://company.webex.com/meet/training123",
label="Join WebEx Session",
meeting_code="987654321",
password="TrainingPass2024"
),
EntryPoint(
entry_point_type=EntryPoint.PHONE,
uri="tel:+1-800-555-WEBX",
label="WebEx Audio",
access_code="987654321"
)
]
)
)
gc.add_event(webex_session)from gcsa.event import Event
from gcsa.conference import ConferenceSolution, EntryPoint, SolutionType
from datetime import datetime
hybrid_meeting = Event(
summary="Board Meeting (Hybrid)",
start=datetime(2024, 5, 20, 14, 0),
end=datetime(2024, 5, 20, 16, 0),
location="Conference Room A / Online",
description="In-person attendees in Conference Room A, remote attendees via video",
conference_solution=ConferenceSolution(
solution_type=SolutionType.ADD_ON,
name="Multi-Platform Conference",
conference_id="hybrid-board-meeting-2024-05",
entry_points=[
EntryPoint(
entry_point_type=EntryPoint.VIDEO,
uri="https://meet.company.com/board-meeting",
label="Primary Video Link"
),
EntryPoint(
entry_point_type=EntryPoint.VIDEO,
uri="https://backup.company.com/board-meeting",
label="Backup Video Link"
),
EntryPoint(
entry_point_type=EntryPoint.PHONE,
uri="tel:+1-555-BOARD",
label="Audio Only Dial-in",
access_code="BoardMeeting2024"
),
EntryPoint(
entry_point_type=EntryPoint.SIP,
uri="sip:board@company.com",
label="SIP Connection for Video Systems"
)
],
notes="Please join 5 minutes early for technical check. Backup options available if primary fails."
)
)
gc.add_event(hybrid_meeting)from gcsa.event import Event
from gcsa.conference import ConferenceSolution, EntryPoint, SolutionType
from datetime import datetime
custom_conference = Event(
summary="Customer Support Training",
start=datetime(2024, 6, 5, 10, 0),
end=datetime(2024, 6, 5, 12, 0),
conference_solution=ConferenceSolution(
solution_type=SolutionType.ADD_ON,
name="Custom Training Platform",
conference_id="training-cs-20240605",
entry_points=[
EntryPoint(
entry_point_type=EntryPoint.VIDEO,
uri="https://training.company.com/session/cs-training",
label="Training Platform",
access_code="CS2024",
password="LearnAndGrow"
),
EntryPoint(
entry_point_type=EntryPoint.MORE,
uri="https://company.com/training-guide",
label="Training Setup Guide",
)
],
notes="First-time users: Please visit the setup guide 15 minutes before the session to install required software and test your connection."
)
)
gc.add_event(custom_conference)from gcsa.event import Event
from gcsa.conference import ConferenceSolution, EntryPoint, SolutionType
from datetime import datetime
international_call = Event(
summary="Global Team Sync",
start=datetime(2024, 7, 1, 15, 0), # 3 PM UTC
end=datetime(2024, 7, 1, 16, 0),
timezone="UTC",
conference_solution=ConferenceSolution(
solution_type=SolutionType.ADD_ON,
name="Global Conference Bridge",
conference_id="global-sync-070124",
entry_points=[
EntryPoint(
entry_point_type=EntryPoint.VIDEO,
uri="https://meet.company.com/global-sync",
label="Video Conference"
),
EntryPoint(
entry_point_type=EntryPoint.PHONE,
uri="tel:+1-555-0100",
label="USA/Canada Dial-in",
access_code="1234567890"
),
EntryPoint(
entry_point_type=EntryPoint.PHONE,
uri="tel:+44-20-1234-5678",
label="UK Dial-in",
access_code="1234567890"
),
EntryPoint(
entry_point_type=EntryPoint.PHONE,
uri="tel:+49-30-1234-5678",
label="Germany Dial-in",
access_code="1234567890"
),
EntryPoint(
entry_point_type=EntryPoint.PHONE,
uri="tel:+81-3-1234-5678",
label="Japan Dial-in",
access_code="1234567890"
)
]
)
)
gc.add_event(international_call)from gcsa.google_calendar import GoogleCalendar
from gcsa.conference import EntryPoint
gc = GoogleCalendar()
# Get existing event with conference
event = gc.get_event("event_id")
# Update conference entry points
if event.conference_solution:
# Add additional entry point
new_entry_point = EntryPoint(
entry_point_type=EntryPoint.PHONE,
uri="tel:+1-800-NEW-LINE",
label="Additional Phone Line"
)
if event.conference_solution.entry_points:
event.conference_solution.entry_points.append(new_entry_point)
else:
event.conference_solution.entry_points = [new_entry_point]
# Update conference notes
event.conference_solution.notes = "Updated: Additional phone line added for better accessibility"
gc.update_event(event)from gcsa.event import Event
from gcsa.conference import ConferenceSolution, EntryPoint, SolutionType
from datetime import datetime
secure_meeting = Event(
summary="Executive Strategy Session",
start=datetime(2024, 8, 15, 16, 0),
end=datetime(2024, 8, 15, 18, 0),
description="Confidential discussion of strategic initiatives",
conference_solution=ConferenceSolution(
solution_type=SolutionType.ADD_ON,
name="Secure Conference Platform",
conference_id="exec-strategy-20240815",
entry_points=[
EntryPoint(
entry_point_type=EntryPoint.VIDEO,
uri="https://secure.company.com/exec-meeting",
label="Secure Video Connection",
access_code="EXEC2024",
password="StrategySession!2024",
meeting_code="ES20240815"
)
],
notes="CONFIDENTIAL: This meeting requires multi-factor authentication. Please ensure you have your security token ready. Screenshots and recordings are prohibited."
)
)
gc.add_event(secure_meeting)from gcsa.event import Event
from gcsa.conference import ConferenceSolutionCreateRequest, SolutionType
from datetime import datetime
# For organizations still using Google Hangouts
hangouts_meeting = Event(
summary="Casual Team Check-in",
start=datetime(2024, 2, 20, 11, 0),
end=datetime(2024, 2, 20, 11, 30),
conference_solution=ConferenceSolutionCreateRequest(
solution_type=SolutionType.HANGOUT # Legacy Hangouts
)
)
gc.add_event(hangouts_meeting)from gcsa.google_calendar import GoogleCalendar
from gcsa.event import Event
from gcsa.conference import ConferenceSolutionCreateRequest, SolutionType
from googleapiclient.errors import HttpError
from datetime import datetime
gc = GoogleCalendar()
try:
# Event with conference solution
event = Event(
summary="Test Conference Event",
start=datetime(2024, 3, 1, 10, 0),
end=datetime(2024, 3, 1, 11, 0),
conference_solution=ConferenceSolutionCreateRequest(
solution_type=SolutionType.HANGOUTS_MEET
)
)
created_event = gc.add_event(event)
# Check if conference was successfully created
if hasattr(created_event, 'hangout_link') and created_event.hangout_link:
print(f"Conference created successfully: {created_event.hangout_link}")
else:
print("Conference creation may have failed")
except HttpError as e:
if "conferenceSolution" in str(e):
print(f"Conference solution error: {e}")
else:
print(f"General API error: {e}")
except Exception as e:
print(f"Unexpected error: {e}")from gcsa.google_calendar import GoogleCalendar
gc = GoogleCalendar()
# Get event and extract conference details
event = gc.get_event("event_id")
if event.conference_solution:
conf = event.conference_solution
print(f"Conference: {conf.name}")
print(f"Conference ID: {conf.conference_id}")
if conf.entry_points:
print("Entry Points:")
for ep in conf.entry_points:
print(f" {ep.entry_point_type}: {ep.uri}")
if ep.label:
print(f" Label: {ep.label}")
if ep.access_code:
print(f" Access Code: {ep.access_code}")
if conf.notes:
print(f"Notes: {conf.notes}")
# For Google Meet events, also check hangout_link
if hasattr(event, 'hangout_link') and event.hangout_link:
print(f"Google Meet Link: {event.hangout_link}")The conference solution classes in GCSA provide comprehensive support for integrating video conferencing into calendar events. Whether using Google's native solutions like Meet and Hangouts or third-party platforms like Zoom, Teams, and WebEx, the system can accommodate various conference entry methods, authentication requirements, and international accessibility needs.
Install with Tessl CLI
npx tessl i tessl/pypi-gcsa