feat: funciones Python para API Metabase
Añade módulo Python con funciones para la API de Metabase en dominio infra. Incluye cliente HTTP, auth, y CRUD de cards, dashboards y users. Proyecto gestionado con uv (pyproject.toml).
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: metabase_update_user
|
||||
kind: function
|
||||
lang: py
|
||||
domain: infra
|
||||
version: "1.0.0"
|
||||
purity: impure
|
||||
signature: "def metabase_update_user(client: MetabaseClient, user_id: int, **fields) -> dict"
|
||||
description: "Actualiza campos de un usuario en Metabase via keyword arguments. Campos: first_name, last_name, email, is_superuser, group_ids, locale. Endpoint: PUT /api/user/:id."
|
||||
tags: [metabase, user, update, api, python]
|
||||
uses_functions: []
|
||||
uses_types: []
|
||||
returns: []
|
||||
returns_optional: false
|
||||
error_type: "error_go_core"
|
||||
imports: [httpx]
|
||||
tested: false
|
||||
tests: []
|
||||
test_file_path: ""
|
||||
file_path: "python/functions/metabase/users.py"
|
||||
---
|
||||
|
||||
## Ejemplo
|
||||
|
||||
```python
|
||||
metabase_update_user(client, 5, first_name="Jane", is_superuser=True)
|
||||
metabase_update_user(client, 5, group_ids=[1, 3, 5])
|
||||
```
|
||||
|
||||
## Notas
|
||||
|
||||
Solo se modifican los campos pasados como kwargs.
|
||||
Reference in New Issue
Block a user