MCPcopy Index your code
hub / github.com/Kaggle/docker-python / _write_credentials_file

Method _write_credentials_file

patches/kaggle_secrets.py:125–131  ·  view source on GitHub ↗
(self, credentials)

Source from the content-addressed store, hash-verified

123 return self._get_access_token(GcpTarget.BIGQUERY)
124
125 def _write_credentials_file(self, credentials) -> str:
126 adc_path = os.path.join(os.environ.get('HOME', '/'), 'gcloud_credential.json')
127 with open(adc_path, 'w') as f:
128 f.write(credentials)
129 os.environ['GOOGLE_APPLICATION_CREDENTIALS']=adc_path
130
131 return adc_path
132
133 def _get_gcs_access_token(self) -> Tuple[str, Optional[datetime]]:
134 return self._get_access_token(GcpTarget.GCS)

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected