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 credential manager for interactive Python environments that helps users authenticate with Google APIs.
Create a Python module that provides a simple function to obtain Google OAuth credentials interactively. The function should:
The solution should be straightforward for interactive environments like Jupyter notebooks or IPython shells.
@generates
def get_credentials(client_id: str, client_secret: str, scopes: list[str]):
"""
Obtain Google OAuth credentials interactively.
This function simplifies the OAuth flow for interactive environments by:
- Automatically finding an available local port for the redirect server
- Opening the user's browser for authentication
- Handling the OAuth callback
- Returning ready-to-use credentials
Args:
client_id: The OAuth 2.0 client ID
client_secret: The OAuth 2.0 client secret
scopes: List of OAuth 2.0 scopes to request
Returns:
Credentials object ready for use with Google API client libraries
"""
passProvides OAuth 2.0 integration for Google authentication flows, including interactive authentication utilities.
@satisfied-by