📝 doc pydantic character builder

This commit is contained in:
anthony-melin
2026-05-19 23:43:47 +02:00
parent 7c2c929966
commit c6a7b139a3
+29 -1
View File
@@ -71,4 +71,32 @@ Pour exécuter ce projet, vous aurez besoin de Python 3.7 ou supérieur.
```bash
python3 app.py
```
```
## Personnalisation du CharacterBuilder
Le `CharacterBuilder` peut être personnalisé pour utiliser différentes implémentations de sauvegarde et de chargement selon vos besoins.
Cette personnalisation se fait simplement en définissant une variable d'environnement avant de lancer votre script Python.
### Variable d'environnement : `ELIRON_BUILDER`
- **Nom** : `ELIRON_BUILDER`
- **Valeur possible** :
- `"pydantic"` : Utilise des implementations basées sur `pydantic`.
- Toute autre valeur ou absence de variable : Utilise les fonctions par défaut.
> ⚠️ **Important** : Pour utiliser le builder pydantic, vous devez avoir installé le package `pydantic` au préalable :
> ```bash
> pip install pydantic
> ```
### Exemple d'utilisation sous Linux / macOS
```bash
# Pour utiliser l'implémentation pydantic
export ELIRON_BUILDER=pydantic
python app.py
# Pour utiliser l'implémentation par defaut
unset ELIRON_BUILDER
python app.py