| 26 | |
| 27 | |
| 28 | class KernelIntegrations(): |
| 29 | def __init__(self): |
| 30 | self.integrations = {} |
| 31 | |
| 32 | def add_integration(self, target): |
| 33 | self.integrations[target] = True |
| 34 | |
| 35 | def has_integration(self, target): |
| 36 | return target in self.integrations |
| 37 | |
| 38 | def has_bigquery(self): |
| 39 | return GcpTarget.BIGQUERY in self.integrations |
| 40 | |
| 41 | def has_gcs(self): |
| 42 | return GcpTarget.GCS in self.integrations |
| 43 | |
| 44 | def has_cloudai(self): |
| 45 | return GcpTarget.CLOUDAI in self.integrations or \ |
| 46 | GcpTarget.AUTOML in self.integrations |
| 47 | |
| 48 | class KaggleKernelCredentials(credentials.Credentials): |
| 49 | """Custom Credentials used to authenticate using the Kernel's connected OAuth account. |