def get_session(self):
        """Create Session to store credentials.

        Returns
            (Session)
                A Session object with OAuth 2.0 credentials.
        """
        response = _request_access_token(
            grant_type=auth.CLIENT_CREDENTIALS_GRANT,
            client_id=self.client_id,
            client_secret=self.client_secret,
            scopes=self.scopes,
        )

        oauth2credential = OAuth2Credential.make_from_response(
            response=response,
            grant_type=auth.CLIENT_CREDENTIALS_GRANT,
            client_id=self.client_id,
            client_secret=self.client_secret,
        )

        return Session(oauth2credential=oauth2credential)
def get_session ( self ) : response = _request_access_token ( grant_type = auth . CLIENT_CREDENTIALS_GRANT , client_id = self . client_id , client_secret = self . client_secret , scopes = self . scopes , ) oauth2credential = OAuth2Credential . make_from_response ( response = response , grant_type = auth . CLIENT_CREDENTIALS_GRANT , client_id = self . client_id , client_secret = self . client_secret , ) return Session ( oauth2credential = oauth2credential )
Create Session to store credentials.

        Returns
            (Session)
                A Session object with OAuth 2.0 credentials.