Support authorised user credentials #452
Labels
api: bigquery
Issues related to the googleapis/python-bigquery-sqlalchemy API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Currently we only support service accounts because we directly use
google.oauth2.service_account
:python-bigquery-sqlalchemy/sqlalchemy_bigquery/_helpers.py
Lines 45 to 54 in 285913a
A possible solution to that, depending on the credential argument:
credential_path
: directly useload_credentials_from_file
fromgoogle.auth
credential_info
/credential_base64
: Unfortunately the_load_credentials_from_info
is private togoogle.auth
, but we can add a utility function to mimic its behaviour for service accounts and authorised users since that's just dispatch for those cases.google.auth.load_credentials_from_file
: https://github.com/googleapis/google-auth-library-python/blob/f3b72e161ec8302251f04b0121d59476a167a729/google/auth/_default.py#L82The text was updated successfully, but these errors were encountered: