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

Function init_gcs

patches/kaggle_gcp.py:239–253  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

237 return client_info
238
239def init_gcs():
240 from google.cloud import storage
241 if not is_user_secrets_token_set():
242 return storage
243
244 from kaggle_gcp import get_integrations
245 if not get_integrations().has_gcs():
246 return storage
247
248 from kaggle_secrets import GcpTarget
249 from kaggle_gcp import KaggleKernelCredentials
250 monkeypatch_client(
251 storage.Client,
252 KaggleKernelCredentials(target=GcpTarget.GCS))
253 return storage
254
255def init_translation_v2():
256 from google.cloud import translate_v2

Callers 5

test_ctrMethod · 0.90
initFunction · 0.85

Calls 5

get_integrationsFunction · 0.90
monkeypatch_clientFunction · 0.85
has_gcsMethod · 0.80

Tested by 4

test_ctrMethod · 0.72