Files
egutierrez 47fac22230 chore: auto-commit (799 archivos)
- .claude/CLAUDE.md
- .claude/commands/subagentes.md
- .claude/rules/INDEX.md
- .mcp.json
- bash/functions/cybersecurity/analyze_dns.md
- bash/functions/cybersecurity/audit_http_headers.md
- bash/functions/cybersecurity/audit_ssh_config.md
- bash/functions/cybersecurity/check_firewall.md
- bash/functions/cybersecurity/detect_suspicious_users.md
- bash/functions/cybersecurity/encrypt_file.md
- ...

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 00:28:20 +02:00

1.6 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports params output tested tests test_file_path file_path
bq_auth function py infra 1.0.0 impure def bq_auth(project_id: str = '', credentials_path: str = '') -> BQClient Autentica contra Google BigQuery con ADC o service account JSON. Retorna un BQClient listo para usar con todas las funciones CRUD.
bigquery
gcp
auth
google-cloud
python
pendiente-usar
false error_go_core
google-cloud-bigquery
name desc
project_id ID del proyecto GCP (vacio = detectar de credenciales/entorno)
name desc
credentials_path ruta a archivo JSON de service account (vacio = Application Default Credentials)
BQClient: cliente autenticado con proyecto resuelto false
python/functions/bigquery/client.py

Ejemplo

from bigquery import bq_auth

# ADC (gcloud auth application-default login)
client = bq_auth()

# Proyecto explicito
client = bq_auth("my-project-id")

# Service account
client = bq_auth(credentials_path="/path/to/service-account.json")

# Context manager
with bq_auth() as client:
    # client se cierra automaticamente
    pass

Notas

Tres modos de autenticacion:

  • Sin argumentos: usa Application Default Credentials (ADC) — requiere gcloud auth application-default login
  • Con project_id: usa ADC pero fuerza el proyecto
  • Con credentials_path: lee el JSON de service account directamente

El BQClient wrappea google.cloud.bigquery.Client y expone _client para que las funciones del modulo lo usen internamente.