Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

forge-mvc-settings

Paramètres applicatifs opt-in pour Forge : des réglages d'application persistés dans MariaDB, en paire clé/valeur typée, avec une API explicite.

Ce paquet évite de tout mettre dans .env : ce qui change à l'exécution (nom d'établissement, durée d'une session, mode maintenance, options pédagogiques) vit dans une table app_settings, lisible et modifiable par l'application.

Installation

pip install --pre forge-mvc-settings

En développement depuis le dépôt Forge : pip install -e ./packages/forge-mvc-settings.

Mise en place de la table

La table n'est pas créée automatiquement (principe : SQL visible, pas d'écriture cachée). Le paquet fournit une migration :

forge settings:init        # copie la migration dans mvc/migrations/
forge migration:apply      # crée la table app_settings

Utilisation

from forge_mvc_settings import get_setting, set_setting

set_setting("etablissement.nom", "Collège Victor Hugo")
set_setting("qcm.session_duration", 30)        # int
set_setting("maintenance", False)              # bool

nom = get_setting("etablissement.nom")          # "Collège Victor Hugo"
duree = get_setting("qcm.session_duration", 20) # 30 (int)
en_maintenance = get_setting("maintenance")     # False (bool)

L'API expose get_setting, set_setting, get_all_settings, delete_setting, plus SettingsError, TABLE_NAME et SUPPORTED_TYPES.

Périmètre

  • Types supportés : str, int, bool, float (sérialisés en texte, recoercés à la lecture).
  • Le cœur de Forge ignore tout des paramètres ; la dépendance va de l'opt-in vers le cœur, jamais l'inverse.
  • Hors périmètre : cache, secrets chiffrés, paramètres par utilisateur.

Documentation complète : https://forgemvc.com/docs/forge/.

Release files for forge-mvc-settings 1.0.0rc8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forge-mvc-settings 1.0.0rc8
File Size Uploaded
forge_mvc_settings-1.0.0rc8.tar.gz 25.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for forge-mvc-settings 1.0.0rc8
File Interpreter ABI Platform
forge_mvc_settings-1.0.0rc8-py3-none-any.whl Python 3 none any Details

Total release size: 43.0 kB

Release files / forge_mvc_settings-1.0.0rc8.tar.gz

Download URL forge_mvc_settings-1.0.0rc8.tar.gz
Size 25.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b4ff5aea70d15503ad522a7084629e9a00675748242a6263d0e6398a800ec710
BLAKE2b-256 checksum
How to use checksums
c2df0aa1b0cae790dcba382945e8d62bfc1bb233dc3c2a000628e9a5445a499a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / forge_mvc_settings-1.0.0rc8-py3-none-any.whl

Download URL forge_mvc_settings-1.0.0rc8-py3-none-any.whl
Size 17.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62f037f6d253b02dadf5d420bb57d8d60fc2aa919acd7c374d83776a606c23b9
BLAKE2b-256 checksum
How to use checksums
e59b423a75dd243ba5a404067e93ea5df55c1d4f10a1f9d26a5fee39ce6902da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page