""" This type stub file was generated by pyright. """ """Helpers for authentication using oauth2client or google-auth.""" HAS_GOOGLE_AUTH = ... HAS_OAUTH2CLIENT = ... def credentials_from_file(filename, scopes=..., quota_project_id=...): # -> Credentials | ServiceAccountCredentials: """Returns credentials loaded from a file.""" ... def default_credentials(scopes=..., quota_project_id=...): """Returns Application Default Credentials.""" ... def with_scopes(credentials, scopes): # -> Scoped: """Scopes the credentials if necessary. Args: credentials (Union[ google.auth.credentials.Credentials, oauth2client.client.Credentials]): The credentials to scope. scopes (Sequence[str]): The list of scopes. Returns: Union[google.auth.credentials.Credentials, oauth2client.client.Credentials]: The scoped credentials. """ ... def authorized_http(credentials): # -> AuthorizedHttp: """Returns an http client that is authorized with the given credentials. Args: credentials (Union[ google.auth.credentials.Credentials, oauth2client.client.Credentials]): The credentials to use. Returns: Union[httplib2.Http, google_auth_httplib2.AuthorizedHttp]: An authorized http client. """ ... def refresh_credentials(credentials): ... def apply_credentials(credentials, headers): ... def is_valid(credentials): # -> bool: ... def get_credentials_from_http(http): # -> None: ...