bpm.crud
Page CRUD (liste, formulaire, colonnes, champs, endpoint).
Utilisateurs (démo)
Chargement...
Python
bpm.crud(title="Produits", endpoint="/api/products", columns=cols, fields=fields)| Prop | Type | Défaut | Requis | Description |
|---|---|---|---|---|
title | string | — | Oui | Titre de la page. |
endpoint | string | — | Oui | URL de l'API (GET liste, POST création, PUT/DELETE par id). |
columns | CrudColumn[] | — | Oui | Colonnes du tableau (key, label, type?, sortable?). |
fields | CrudField[] | — | Oui | Champs du formulaire (key, label, type, required?, options?). |
domain | string | — | Non | Domaine optionnel. |
semantic | string | — | Non | Sémantique optionnelle. |
idKey | string | id | Non | Champ utilisé comme identifiant pour GET/PUT/DELETE. |
Exemples
cols = [{"key": "name", "label": "Nom", "type": "text"}, {"key": "price", "label": "Prix", "type": "number"}]
fields = [{"key": "name", "label": "Nom", "type": "text", "required": True}, {"key": "price", "label": "Prix", "type": "number"}]
bpm.crud(title="Produits", endpoint="/api/products", columns=cols, fields=fields)bpm.crud(title="Utilisateurs", endpoint="/api/users", columns=cols, fields=fields, idKey="uuid")