tessl install tessl/pypi-google-auth-oauthlib@1.2.0Google 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%
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.
@generates
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
"""
passProvides OAuth 2.0 flow management and credentials integration with Google authentication infrastructure.
@satisfied-by