Skip to content

lazarofl/typings-google-calendar-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPI version

Python typehint support for Google Calendar API responses - Google API python

Screen.Recording.2022-02-04.at.15.51.05.mov

Installation

pip install typings-google-calendar-api

Sample

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()

Available Resources

Acl

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

Calendars

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

Colors

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]

Events

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

Todo

  • CalendarList resource - Open for contributions :octocat:

Dependencies

About

Python typehint support for Google Calendar API resources

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages