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_create_user
|
||||
kind: function
|
||||
lang: py
|
||||
domain: infra
|
||||
version: "1.0.0"
|
||||
purity: impure
|
||||
signature: "def metabase_create_user(client: MetabaseClient, first_name: str, last_name: str, email: str, password: str = '', group_ids: list[int] | None = None) -> dict"
|
||||
description: "Crea un nuevo usuario en Metabase. Sin password envia invitacion por email. Requiere superusuario. Endpoint: POST /api/user."
|
||||
tags: [metabase, user, create, 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
|
||||
user = metabase_create_user(client, "John", "Doe", "john@example.com", "pass123")
|
||||
user = metabase_create_user(client, "Jane", "Smith", "jane@example.com", group_ids=[1, 3])
|
||||
```
|
||||
|
||||
## Notas
|
||||
|
||||
Email debe ser unico. Error 400 si ya existe.
|
||||
Reference in New Issue
Block a user