Python typehint support for Google Calendar API responses - Google API python
Screen.Recording.2022-02-04.at.15.51.05.mov
pip install typings-google-calendar-api
from googleapiclient.discovery import build_from_document
from typing import List
from typings_google_calendar_api.events import Event
service = build_from_document(DISCOVERY_DOC, http=creds.authorize(Http()))
events: List[Events] = service.events().list(
calendarId=self.resource_id,
singleEvents=True,
showDeleted=True,
).execute()
from typings_google_calendar_api.acl import Acl, Scope
Representation: https://developers.google.com/calendar/api/v3/reference/acl#resource-representations
kind: str
etag: str
id: str
scope: Scope
role: str
from typings_google_calendar_api.calendars import Calendar, ConferenceProperties
Representation: https://developers.google.com/calendar/api/v3/reference/calendarsl#resource-representations
kind: str
etag: str
id: str
summary: str
description: str
location: str
timeZone: str
conferenceProperties: ConferenceProperties
from typings_google_calendar_api.colors import Color, ColorProperties
Representation: https://developers.google.com/calendar/api/v3/reference/colors#resource-representations
kind: str
updated: str
calendar: Dict[str, ColorProperties]
event: Dict[str, ColorProperties]
from typings_google_calendar_api.events import ( Event, Attendee, Date, Person, ExtendedProperties,
ConferenceSolutionKey, ConferenceSolution, StatusCode, ConferenceDataCreateRequest, EntryPoint,
ConferenceData, Gadget, Override, Reminders, Source, Attachment)
Representation: https://developers.google.com/calendar/api/v3/reference/events#resource-representations
kind: str
etag: str
id: str
status: str
htmlLink: str
created: str # RFC3339 timestamp
updated: str # RFC3339 timestamp
summary: str
description: str
location: str
colorId: str
creator: Person
organizer: Person
start: Date
end: Date
endTimeUnspecified: bool
recurrence: List[str]
recurringEventId: str
originalStartTime: Date
transparency: str
visibility: str
iCalUID: str
sequence: int
attendees: List[Attendee]
attendeesOmitted: bool
extendedProperties: ExtendedProperties
hangoutLink: str
conferenceData: ConferenceData
gadget: Gadget
anyoneCanAddSelf: bool
guestsCanInviteOthers: bool
guestsCanModify: bool
guestsCanSeeOtherGuests: bool
privateCopy: bool
locked: bool
reminders: Reminders
source: Source
attachments: List[Attachment]
eventType: str
- CalendarList resource - Open for contributions
- typing_extensions - for python version < 3.7