googlesheets/api.py
def init(self, json_keyfile: pathlib.Path, version: str = 'v4') -> None:
        """instantiate the googlesheets oauth2 service client."""

        credentials = google.oauth2.service_account.Credentials.from_service_account_file(
            str(json_keyfile), scopes=Client.DEFAULT_SCOPES)

        params = {
            'credentials': credentials,
            'discoveryServiceUrl': f'https://sheets.googleapis.com/$discovery/rest?version={version}',
        }

        self.service = googleapiclient.discovery.build(
            'sheets', version, **params).spreadsheets()
instantiate the googlesheets oauth2 service client.
instantiate the googlesheets oauth2 service client.
instantiate the googlesheets oauth2 service client .
def init(self, json_keyfile: pathlib.Path, version: str = 'v4') -> None:
        credentials = google.oauth2.service_account.Credentials.from_service_account_file(
            str(json_keyfile), scopes=Client.DEFAULT_SCOPES)
        params = {
            'credentials': credentials,
            'discoveryServiceUrl': f'https://sheets.googleapis.com/$discovery/rest?version={version}',
        }
        self.service = googleapiclient.discovery.build(
            'sheets', version, **params).spreadsheets()
def init ( self , json_keyfile : pathlib . Path , version : str = 'v4' ) -> None : credentials = google . oauth2 . service_account . Credentials . from_service_account_file ( str ( json_keyfile ) , scopes = Client . DEFAULT_SCOPES ) params = { 'credentials' : credentials , 'discoveryServiceUrl' : f'https://sheets.googleapis.com/$discovery/rest?version={version}' , } self . service = googleapiclient . discovery . build ( 'sheets' , version , ** params ) . spreadsheets ( )
instantiate the googlesheets oauth2 service client.
instantiate the googlesheets oauth2 service client .
"""instantiate the googlesheets oauth2 service client."""
self
json_keyfile
pathlib.Path
version
str