mit einem Klick
using-oauth-integrations
// Use OAuth integrations in inference.sh apps. Use when accessing Google Sheets, Drive, or other OAuth services on behalf of users.
// Use OAuth integrations in inference.sh apps. Use when accessing Google Sheets, Drive, or other OAuth services on behalf of users.
Configure inf.yml for inference.sh apps. Use when setting GPU, VRAM, RAM, categories, environment variables, packages.txt, or resource requirements.
Debug and troubleshoot inference.sh apps. Use when facing import errors, CUDA issues, memory problems, or deployment failures.
Handle graceful cancellation in inference.sh apps. Use when implementing long-running tasks that users might cancel.
Handle API keys and sensitive values in inference.sh apps. Use when adding secrets, accessing environment variables, or securing credentials.
Optimize inference.sh app performance. Use when handling memory, devices, model loading, mixed precision, or flash attention.
Build and deploy applications on inference.sh. Use when getting started, understanding the platform, or needing an overview of inference.sh development.
| name | using-oauth-integrations |
| description | Use OAuth integrations in inference.sh apps. Use when accessing Google Sheets, Drive, or other OAuth services on behalf of users. |
Access external services (Google Sheets, Drive) on behalf of users through OAuth.
In inf.yml:
integrations:
- key: google.sheets
description: Read/write Google Sheets
optional: false
infsh integrations list
| Key | Description |
|---|---|
google.sheets | Read/write Sheets |
google.sheets.readonly | Read-only Sheets |
google.drive | Google Drive files |
google.sa | Service account |
import os, json
creds_json = os.environ.get("GOOGLE_OAUTH_CREDENTIALS")
if creds_json:
credentials = json.loads(creds_json)
from google.oauth2 import service_account
sa_json = os.environ.get("GOOGLE_SA_CREDENTIALS")
if sa_json:
credentials = service_account.Credentials.from_service_account_info(
json.loads(sa_json)
)
📖 Full docs: inference.sh/docs/extend/integrations