from google.oauth2 import service_account
from googleapiclient import discovery


def get_calendar_service():
  SCOPES = ['https://www.googleapis.com/auth/calendar']
  SERVICE_ACCOUNT_FILE = './service_credentials.json'

  credentials = service_account.Credentials.from_service_account_file(
      SERVICE_ACCOUNT_FILE, scopes=SCOPES)

  service = discovery.build('calendar', 'v3', credentials=credentials)
  return service

