INNER CODE UNIT · Python

_fetch_new_client_credentials

Squarespace/datasheets · datasheets/client.py:128

    def _fetch_new_client_credentials(self):
        """Fetch new user credentials

        Uses the secrets stored at ``$DATASHEETS_SECRETS_PATH``
        (default: ``~/.datasheets/client_secrets.json``).
        """
        unexpanded_client_secrets_path = os.environ.get('DATASHEETS_SECRETS_PATH',
                                                        '~/.datasheets/client_secrets.json')
        client_secrets_path = os.path.expanduser(unexpanded_client_secrets_path)
        scope = [
            'https://www.googleapis.com/auth/drive',
            'https://www.googleapis.com/auth/userinfo.email',
            'https://www.googleapis.com/auth/plus.me'
        ]
        flow = InstalledAppFlow.from_client_secrets_file(
            client_secrets_path,
            scopes=scope)
        flow.user_agent = self.user_agent

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…