Ctrl + K
DocumentationLog inGet started

tessl/pypi-google-auth-oauthlib

tessl install tessl/pypi-google-auth-oauthlib@1.2.0

Google Authentication Library - oauthlib integration for OAuth 2.0 flows.

Agent Success

Agent success rate when using this tile

83%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.05x

Baseline

Agent success rate without this tile

79%

task.mdevals/scenario-5/

OAuth Credentials Manager

Build a Python module that manages OAuth 2.0 credentials for accessing Google APIs. The module should handle the OAuth flow using a local server, persist credentials to disk for reuse, and provide an authenticated session for making API requests.

Capabilities

OAuth Flow Execution

  • Run the complete OAuth 2.0 authorization flow for a desktop application using a local callback server on port 8080, and save the resulting credentials to a file @test
  • When credentials already exist in the file, load them instead of running the OAuth flow again @test

Authenticated Session Access

  • Provide an authenticated HTTP session that can make authorized requests to Google APIs @test
  • Return credentials object with token and client information available @test

Implementation

@generates

API

class CredentialsManager:
    """Manages OAuth 2.0 credentials for Google API access."""

    def __init__(self, client_secrets_file: str, scopes: list[str], credentials_file: str):
        """
        Initialize the credentials manager.

        Args:
            client_secrets_file: Path to the OAuth client secrets JSON file
            scopes: List of OAuth 2.0 scopes to request
            credentials_file: Path where credentials should be saved/loaded
        """
        pass

    def get_credentials(self):
        """
        Get valid credentials, running OAuth flow if needed.

        Returns:
            google.oauth2.credentials.Credentials: Valid credentials object
        """
        pass

    def get_authenticated_session(self):
        """
        Get an authenticated HTTP session for making API requests.

        Returns:
            google.auth.transport.requests.AuthorizedSession: Authorized session
        """
        pass

Dependencies { .dependencies }

google-auth-oauthlib { .dependency }

Provides OAuth 2.0 flow management and credentials integration with Google authentication infrastructure.

@satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/google-auth-oauthlib@1.2.x
tile.json